mirror of
https://github.com/emmansun/gmsm.git
synced 2025-10-14 15:20:45 +08:00
修改随机数长度
This commit is contained in:
parent
5c7f06b218
commit
8464ad14f7
@ -308,7 +308,7 @@ func TestGmCtrDRBG_Validation(t *testing.T) {
|
|||||||
func TestCtrDrbg_Destroy(t *testing.T) {
|
func TestCtrDrbg_Destroy(t *testing.T) {
|
||||||
entropyInput := make([]byte, 64)
|
entropyInput := make([]byte, 64)
|
||||||
_, _ = rand.Reader.Read(entropyInput)
|
_, _ = rand.Reader.Read(entropyInput)
|
||||||
cd, err := NewCtrDrbg(sm4.NewCipher, 16, SECURITY_LEVEL_ONE, true, entropyInput[:16], entropyInput[16:24], nil)
|
cd, err := NewCtrDrbg(sm4.NewCipher, 16, SECURITY_LEVEL_ONE, true, entropyInput[:32], entropyInput[32:64], nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Errorf("NewCtrDrbg failed: %v", err)
|
t.Errorf("NewCtrDrbg failed: %v", err)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user