Change Log
v1.2.1 (2025-11-24)
- Fix bug where
wNAFalgorithm error inSm2asymmetric elliptic curve encryption algorithm causes decryption failure in some cases - Optimize curve field element operation implementation in
Sm2asymmetric elliptic curve encryption algorithm - Add direct parsing support for
BIT_STRINGformat keys inSm2asymmetric elliptic curve encryption algorithm - Simplify test loop syntax, change from
forloop torangeloop
v1.2.0 (2025-11-11)
- Remove
LoadPublicKeyandLoadPrivateKeymethods fromRSAKeyPairstruct - Remove
LoadPublicKeyandLoadPrivateKeymethods fromEd25519KeyPairstruct - Optimize encoder and decoder performance, reuse read buffer, reduce memory allocation and copying
RSAKeyPairstruct'sGenKeyPair,SetPublicKey,SetPrivateKeymethods changed from no return value to returningerrorEd25519KeyPairstruct'sGenKeyPair,SetPublicKey,SetPrivateKeymethods changed from no return value to returningerrorRSAKeyPairstruct addsFormatPublicKeyandFormatPrivateKeymethods to formatbase64encodedderformatRSApublic and private keys intopemformatEd25519KeyPairstruct addsFormatPublicKeyandFormatPrivateKeymethods to formatbase64encodedderformatEd25519public and private keys intopemformatRSAKeyPairstruct addsCompressPublicKeyandCompressPrivateKeymethods to compresspemformatRSApublic and private keys intobase64encodedderformatEd25519KeyPairstruct addsCompressPublicKeyandCompressPrivateKeymethods to compresspemformatEd25519public and private keys intobase64encodedderformat- Add
Sm2asymmetric elliptic curve encryption algorithm support, including standard processing and streaming processing
v1.1.8 (2025-11-05)
- Fix bug where
*RsaKeyPair.formatPublicKeyand*RsaKeyPair.formatPrivateKeyfail to format keys - Fix bug where
*Ed25519KeyPair.formatPublicKeyand*Ed25519KeyPair.formatPrivateKeyfail to format keys - Fix bug where decoding encrypted ciphertext fails during decryption and the error cannot be retrieved
- Change default padding mode from
PKCS7toNoin symmetric block encryption algorithms - Add
Unicodeencoding/decoding support, including standard processing and streaming processing - Add
TBCpadding mode support for symmetric block encryption algorithms
v1.1.7 (2025-10-20)
- Fix bug in asymmetric digital signature algorithm verification #30
- Optimize streaming processing logic, add support for
readerposition reset to ensure reading from the beginning of the data source, avoiding position offset issues caused by previous read operations, ensuring completeness and correctness of streaming operations - Change private methods
newXXXEncrypterandnewXXXDecrypterseries incrypto/cipher/block.goto public methodsNewXXXEncrypterandNewXXXDecrypter - Change private methods
newXXXPaddingandnewXXXUnPaddingseries incrypto/cipher/padding.goto public methodsNewXXXPaddingandNewXXXUnPadding - Add
sm4chinese national standard block encryption algorithm support, including standard processing and streaming processing, supporting different block modes and padding modes
v1.1.6 (2025-10-12)
- Use
io.CopyBufferto simplify streaming processing logic - Optimize
teaencryption algorithm to support different block modes and padding modes - Add
xteaencryption algorithm support, including standard processing and streaming processing
v1.1.5 (2025-10-01)
- Fix bug where symmetric encryption algorithms incorrectly perform padding on block modes that don't require padding (such as CFB/OFB/CTR/GCM, etc.), causing encryption/decryption errors
v1.1.4 (2025-09-23)
- Change method receivers from pointer to value to prevent property pollution when using global default instances, with no impact on caller
API - Add
twofishencryption algorithm support, including standard processing and streaming processing
v1.1.3 (2025-09-15)
- Optimize
3DESsymmetric encryption algorithm compatibility with16-byte keys - Optimize
DESsymmetric encryption algorithm validation for unsupportedGCMmode - Optimize
3DESsymmetric encryption algorithm validation for unsupportedGCMmode - Optimize
Blowfishsymmetric encryption algorithm validation for unsupportedGCMmode - Update
testifydependency tov1.11.1 - Add
Salsa20encryption algorithm support, including standard processing and streaming processing
v1.1.2 (2025-09-08)
- Encoding/decoding support customizing file stream buffer size via
coding.BufferSizeglobal variable - Encryption/decryption support customizing file stream buffer size via
crypto.BufferSizeglobal variable - Hash/Hmac algorithms support customizing file stream buffer size via
hash.BufferSizeglobal variable - Add
Blake2bhash algorithm support, includingblake2b-256,blake2b-384andblake2b-512 - Add
Blake2shash algorithm support, includingblake2s-128andblake2s-256 - Add
ChaCha20encryption algorithm support - Add
ChaCha20Poly1305encryption algorithm support
v1.1.1 (2025-09-01)
- Symmetric encryption algorithms changed from
ByXXX(cipher.XXXCipher)toByXXX(*cipher.XXXCipher) - Change toolkit package name from
utilstoutil - Encoding/decoding, encryption/decryption, Hash/Hmac, signature/verification support true streaming processing
- When input data is empty, return empty data directly without executing subsequent operations
- Add
ED25519digital signature and verification support - Add
SM3hash algorithm support - Add
mock/hash.goto simulate errors inhash.Hashinterface coding/morse/morse.goadds support for spaces, punctuation, and special characters
v1.1.0 (2025-08-23)
⚠️ This is a breaking change version, please upgrade with caution, but it is strongly recommended to upgrade
- Delete
BySafeURLencoding/decoding method - Delete
Sm3hash algorithm (hash) and message authentication code algorithm (hmac) - Rename
ByBase64URLencoding/decoding method toByBase64Url - Hash algorithm (
hash) calling method changed fromdongle.Encrypt.ByXXX()todongle.Hash.ByXXX() - Message authentication code algorithm (
hmac) calling method changed fromdongle.Encrypt.ByHmacXXX()todongle.Hash.WithKey().ByXXX() - Refactor
AES,DES,3DES,Blowfishand other symmetric encryption/decryption methods, uniformly usecipher.NewXXXCipher() - Refactor
RSAand other asymmetric encryption/decryption methods, uniformly usekeypair.NewXXXKeyPair() - Add support for
file streamencoding/decoding, encryption/decryption, Hash/HMAC, signature/verification - Add new
ByBase32Hexencoding/decoding method - Add support for
base32/base32Hexencoding custom character - Add support for
base45encoding custom character - Add support for
base62encoding custom character - Add support for
base64/base64Urlencoding custom character
v1.0.1 (2024-11-22)
- Optimize code quality and organizational structure
- Fix bug with
AES-CBC-PKCS5encryption/decryption errors base62supports custom encoding tables- Delete
errors.gofile, migrate error messages to individual files - Unify unit test format
- Remove Chinese comments
v1.0.0 (2024-11-11)
- Fixed panic caused by AES/ECB/PKCS5 padding
- Changed repository and badge urls
For change logs of earlier versions, please refer to releases