init: v1.0.0
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
package sm4
|
||||
|
||||
import "crypto/cipher"
|
||||
|
||||
// NewGCM return a standard AEAD for sm4-gcm of 12 bytes nonce and 16 bytes tag.
|
||||
func NewGCM(key []byte) (cipher.AEAD, error) {
|
||||
c, err := NewCipher(key)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return cipher.NewGCM(c)
|
||||
}
|
||||
Reference in New Issue
Block a user