]> Cypherpunks.ru repositories - gogost.git/blobdiff - src/cypherpunks.ru/gogost/gost3410/2001_test.go
Forbid any later GNU GPL versions autousage
[gogost.git] / src / cypherpunks.ru / gogost / gost3410 / 2001_test.go
index c529b89b9cc07e33b2e97b637475765c5aaa8172..90da48c62f0cdb3482cadb57ead25dbbf7e5a03e 100644 (file)
@@ -3,8 +3,7 @@
 //
 // This program is free software: you can redistribute it and/or modify
 // it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
+// the Free Software Foundation, version 3 of the License.
 //
 // This program is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -161,7 +160,9 @@ func BenchmarkVerify2001(b *testing.B) {
 
 func TestPrvEqualsTo1(t *testing.T) {
        c := CurveIdGostR34102001TestParamSet()
-       prv, err := NewPrivateKey(c, Mode2001, []byte{0x01})
+       prvRaw := make([]byte, int(Mode2001))
+       prvRaw[len(prvRaw)-1] = 1
+       prv, err := NewPrivateKey(c, Mode2001, prvRaw)
        if err != nil {
                t.FailNow()
        }