package
1.3.6
Repository: https://github.com/undertreetech/waterdrop.git
Documentation: pkg.go.dev

# Functions

DecodeString decodes string data to bytes in designed encoded type.
EncodeToString encodes data to string with encode type.
GenRsaKey return publicKey, privateKey, error bits: 1024, 2048, 3072, 4096.
Hash hash input data using assigned hash mode.
HashToString hash input to assigned encode mode.
HmacSHA256 returns HMAC bytes for src with the given key.
HmacSHA256ToString returns hmac hash string with the given key and assigned encode mode hash mode: md5, sha1, sha256, sha512, default md5.
NewAesCbcCrypto returns a aes cbc mode crypto.
NewRsaCrypt init with the RSA config.
ParsePrivateKey parses private key bytes to rsa PrivateKey.
ParsePublicKey parses public key bytes to rsa PublicKey.

# Constants

base64 encode.
hex encode.
No description provided by the author
plain text, no encode just string.
No description provided by the author
No description provided by the author
No description provided by the author

# Variables

ErrInvalidEncodeMode unsupported encode mode.
ErrNotFullPadding indicates bad padding size.
ErrNotRsaKey indicates the invalid RSA key.
ErrPaddingSize indicates bad padding size.
ErrPrivateKey indicates the invalid private key.
ErrPublicKey indicates the invalid public key.

# Structs

AesCbcCrypt aes cbc mode.
No description provided by the author
No description provided by the author

# Interfaces

Aes aes crypt interface definition.

# Type aliases

Encode defines the type of bytes encoded to string.
Hash for crypto Hash.