Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Enable xsalsa20 test.

  • Loading branch information...
commit 9d1e4cc35a6f51c95808402d4ce60584d0f3026e 1 parent b8df957
@dchest authored
Showing with 6 additions and 4 deletions.
  1. +6 −4 xsalsa20/xsalsa20_test.go
View
10 xsalsa20/xsalsa20_test.go
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.