Skip to content

Overview ​

Dongle is a simple, semantic and developer-friendly golang crypto package with comprehensive unit test coverage, and has been included by awesome-go

Feature ​

  • Comprehensive Encoding Algorithm Support: Supports multiple encoding formats including Base32/Base45/Base58/Base62/Base64/Base85/Base91/Base100/Hex/Morse/Unicode
  • Robust Hashing Algorithm Support: Supports various hashing algorithms including MD2/MD4/MD5, SHA1/SHA2/SHA3, SM3, BLAKE2b/BLAKE2s, RIPEMD160, and HMAC message authentication
  • Complete Cryptographic Algorithm Support: Supports symmetric encryption algorithms such as RC4, AES, DES, 3DES, Blowfish, SM4, ChaCha20, ChaCha20-Poly1305, Salsa20, TEA/XTea and Twofish, as well as asymmetric encryption algorithms like RSA and SM2
  • Reliable Digital Signature Support: Provides RSA, ED25519 and SM2 digital signature generation and verification with PKCS#1, PKCS#8 and SPKI/PKIX key format support, ensuring data integrity and identity authentication
  • Efficient Streaming Processing: Supports streaming encoding/decoding and encryption/decryption for large files, processing data incrementally without waiting for complete data; Base58/Base62 and SM2 buffer the whole input by design
  • Comprehensive Test Coverage: Comprehensive unit test coverage with extensive testing for all encryption, decryption, hashing, HMAC, and encoding/decoding modules, covering all edge cases and exceptional scenarios
  • Secure and Reliable Design: Provides security features including input validation, error handling, memory safety, with support for key management and unified error messaging
  • Detailed Error Handling: Offers comprehensive error information and types with error chain tracing support, facilitating debugging and issue resolution

Repository ​

github.com/dromara/dongle

gitee.com/dromara/dongle

gitcode.com/dromara/dongle

Released under the MIT License, unauthorized reproduction is prohibited in any form