-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor tests (comment some tests which will be rewritten later)
- Loading branch information
Showing
24 changed files
with
435 additions
and
827 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package crypto | ||
|
||
import ( | ||
"bytes" | ||
|
||
"github.com/coniks-sys/coniks-go/crypto/sign" | ||
"github.com/coniks-sys/coniks-go/crypto/vrf" | ||
) | ||
|
||
// NewStaticTestVRFKey returns a static VRF private key for _tests_. | ||
func NewStaticTestVRFKey() vrf.PrivateKey { | ||
sk, err := vrf.GenerateKey(bytes.NewReader( | ||
[]byte("deterministic tests need 256 bit"))) | ||
if err != nil { | ||
panic(err) | ||
} | ||
return sk | ||
} | ||
|
||
// NewStaticTestSigningKey returns a static private signing key for _tests_. | ||
func NewStaticTestSigningKey() sign.PrivateKey { | ||
sk, err := sign.GenerateKey(bytes.NewReader( | ||
[]byte("deterministic tests need 256 bit"))) | ||
if err != nil { | ||
panic(err) | ||
} | ||
return sk | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.