summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/blocks.go13
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/blocks.go b/lib/blocks.go
index d13b107..9436d3c 100644
--- a/lib/blocks.go
+++ b/lib/blocks.go
@@ -47,3 +47,16 @@ func TransposeBlocks(blocks [][]byte, keysize int) [][]byte {
}
return tblocks
}
+
+func BlocksEqual(a, b []byte) bool {
+ if len(a) != len(b) {
+ return false
+ }
+
+ for i := 0; i < len(a); i++ {
+ if a[i] != b[i] {
+ return false
+ }
+ }
+ return true
+}