mirror of
https://github.com/sonr-io/sonr.git
synced 2026-08-03 09:51:39 +00:00
(no commit message provided)
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
package random_test
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/onsonr/hway/crypto/subtle/random"
|
||||
)
|
||||
|
||||
func TestGetRandomBytes(t *testing.T) {
|
||||
for i := 0; i <= 32; i++ {
|
||||
buf := random.GetRandomBytes(uint32(i))
|
||||
if len(buf) != i {
|
||||
t.Errorf("length of the output doesn't match the input")
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user