Permalink
Browse files

Enable xsalsa20 test.

  • Loading branch information...
dchest committed Aug 30, 2012
1 parent b8df957 commit 9d1e4cc35a6f51c95808402d4ce60584d0f3026e
Showing with 6 additions and 4 deletions.
  1. +6 −4 xsalsa20/xsalsa20_test.go
View
@@ -1,7 +1,7 @@
package xsalsa20
import (
- _ "bytes"
+ "bytes"
"testing"
)
@@ -28,17 +28,19 @@ var testData = []struct {
},
}
-/*
func TestXor(t *testing.T) {
+ var n [24]byte
+ var k [32]byte
for i, v := range testData {
c := make([]byte, len(v.m))
- Xor(c, v.m, v.n, v.k)
+ copy(n[:], v.n)
+ copy(k[:], v.k)
+ Xor(c, v.m, &n, &k)
if !bytes.Equal(c, v.correct) {
t.Errorf("[%d] expected %x, got %x", i, v.correct, c)
}
}
}
-*/
var (
keyarr [32]byte

0 comments on commit 9d1e4cc

Please sign in to comment.