Dongle is a simple, semantic and developer-friendly golang package for encoding&decoding and encryption&decryption.
Dongle
has been included by awesome-go, if you think it is helpful, please give me a star
github.com/golang-module/dongle
Installation
go get -u github.com/golang-module/dongle
import (
"github.com/golang-module/dongle"
)
Change log
- Rename
encode
toencoder
- Rename
decode
todecoder
- Rename
encrypt
toencrypter
, addToRawString()
,ToRawBytes()
methods - Rename
decrypt
todecrypter
, addFromRawString()
,FromRawBytes()
methods - Rename
sign
tosigner
, add ToRawString() 和ToRawBytes()
methods - Rename
verify
toverifier
, addFromRawString()
,FromRawBytes()
,ToBool()
methods - Add encryption support for
sha3-224
,sha3-256
,sha3-384
,sha3-512
- Add encryption support for
hmac-sha3-224
,hmac-sha3-256
,hmac-sha3-384
,hmac-sha3-512
- Add encryption support for
sha512
,sha512-224
,sha512-256
- Add encryption support for
hmac-sha512
,hmac-sha512-224
,hmac-sha512-256
- Add support for
rsa
signature and signature verification - Remove
base58.go
,base62.go
,base91.go
,base100.go
to sub package - Morse encoding and decoding support the specified separator. The default is
/
- Unified unit test format
Feature list
- [x] Encoding and decoding by Hex
- [x] Encoding and decoding by Base16
- [x] Encoding and decoding by Base32
- [x] Encoding and decoding by Base58
- [x] Encoding and decoding by Base62
- [x] Encoding and decoding by Base64
- [x] Encoding and decoding by Base64URL
- [x] Encoding and decoding by SafeURL
- [x] Encoding and decoding by Base85
- [x] Encoding and decoding by Base91
- [x] Encoding and decoding by Base100
- [x] Encoding and decoding by Morse
- [x] Encryption by Md4
- [x] Encryption by Md5
- [x] Encryption by Sha1
- [x] Encryption by Sha3-224
- [x] Encryption by Sha3-256
- [x] Encryption by Sha3-384
- [x] Encryption by Sha3-512
- [x] Encryption by Sha224
- [x] Encryption by Sha256
- [x] Encryption by Sha384
- [x] Encryption by Sha512
- [x] Encryption by Sha512-224
- [x] Encryption by Sha512-256
- [x] Encryption by Ripemd160
- [x] Encryption by Hmac-md4
- [x] Encryption by Hmac-md5
- [x] Encryption by Hmac-sha1
- [x] Encryption by Hmac-sha3-224
- [x] Encryption by Hmac-sha3-256
- [x] Encryption by Hmac-sha3-384
- [x] Encryption by Hmac-sha3-512
- [x] Encryption by Hmac-sha224
- [x] Encryption by Hmac-sha256
- [x] Encryption by Hmac-sha384
- [x] Encryption by Hmac-sha512
- [x] Encryption by Hmac-sha512-224
- [x] Encryption by Hmac-sha512-256
- [x] Encryption by Hmac-ripemd160
- [x] Encryption by Hmac-sm3
- [ ] Encryption and decryption by Rc2
- [x] Encryption and decryption by Rc4
- [ ] Encryption and decryption by Rc5
- [ ] Encryption and decryption by Rc6
- [x] Encryption and decryption by Tea
- [ ] Encryption and decryption by Xtea
- [x] Encryption and decryption by Aes
- [x] Encryption and decryption by Des
- [x] Encryption and decryption by 3Des
- [x] Encryption and decryption by Rsa
- [ ] Encryption and decryption by Ecc
- [ ] Encryption and decryption by Sm2
- [x] Encryption by Sm3
- [ ] Encryption and decryption by Sm4
- [ ] Encryption and decryption by Sm7
- [ ] Encryption and decryption by Sm9
- [x] Sign and verify by Bcrypt
- [x] Sign and verify by Rsa
- [ ] Sign and verify by Dsa