mirror of
https://github.com/emmansun/gmsm.git
synced 2025-04-26 20:26:19 +08:00
enable sm4ni gcm
This commit is contained in:
parent
5744b64c56
commit
0beb90aff8
@ -44,7 +44,7 @@ func newCipher(key []byte) (cipher.Block, error) {
|
||||
} else {
|
||||
expandKeyAsm(&key[0], &ck[0], &c.enc[0], &c.dec[0], 0)
|
||||
}
|
||||
if supportsAES && supportsGFMUL {
|
||||
if (supportsAES || supportSM4) && supportsGFMUL {
|
||||
return &sm4CipherGCM{c}, nil
|
||||
}
|
||||
return &c, nil
|
||||
|
Loading…
x
Reference in New Issue
Block a user