init: v1.0.0

This commit is contained in:
yaole
2026-05-27 23:03:00 +08:00
commit 8d97f750eb
466 changed files with 80067 additions and 0 deletions
+12
View File
@@ -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)
}