mirror of
https://github.com/emmansun/gmsm.git
synced 2025-04-22 10:16:18 +08:00
sm4: ppc64x, gcm fix package usage #249
This commit is contained in:
parent
e8d1100481
commit
7e966a56de
@ -8,12 +8,13 @@ package sm4
|
||||
|
||||
import (
|
||||
"crypto/cipher"
|
||||
"crypto/subtle"
|
||||
_subtle "crypto/subtle"
|
||||
"encoding/binary"
|
||||
"errors"
|
||||
"runtime"
|
||||
|
||||
"github.com/emmansun/gmsm/internal/alias"
|
||||
"github.com/emmansun/gmsm/internal/subtle"
|
||||
)
|
||||
|
||||
// Assert that sm4CipherAsm implements the gcmAble interface.
|
||||
@ -233,7 +234,7 @@ func (g *gcmAsm) Open(dst, nonce, ciphertext, data []byte) ([]byte, error) {
|
||||
panic("cipher: invalid buffer overlap")
|
||||
}
|
||||
|
||||
if subtle.ConstantTimeCompare(expectedTag[:g.tagSize], tag) != 1 {
|
||||
if _subtle.ConstantTimeCompare(expectedTag[:g.tagSize], tag) != 1 {
|
||||
// clear(out)
|
||||
for i := range out {
|
||||
out[i] = 0
|
||||
|
Loading…
x
Reference in New Issue
Block a user