mirror of
https://github.com/emmansun/gmsm.git
synced 2025-04-28 05:06:18 +08:00
sm3: test copyResultsBy4
This commit is contained in:
parent
b95cbabf8b
commit
fa9aba2cd6
@ -110,11 +110,9 @@ func TestBlockMultBy4(t *testing.T) {
|
|||||||
func TestCopyResultsBy4(t *testing.T) {
|
func TestCopyResultsBy4(t *testing.T) {
|
||||||
var m [4][8]uint32
|
var m [4][8]uint32
|
||||||
var ret, expected [128]byte
|
var ret, expected [128]byte
|
||||||
var k uint32 = 0
|
|
||||||
for i := 0; i < 4; i++ {
|
for i := 0; i < 4; i++ {
|
||||||
for j := 0; j < 8; j++ {
|
for j := 0; j < 8; j++ {
|
||||||
m[i][j] = k
|
m[i][j] = _K[i*4+j]
|
||||||
k++
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
copyResultsBy4(&m[0][0], &ret[0])
|
copyResultsBy4(&m[0][0], &ret[0])
|
||||||
|
Loading…
x
Reference in New Issue
Block a user