Versions in this module Expand all Collapse all v1 v1.0.1 Apr 11, 2024 Changes in this version + var ErrCipherTextLengthIncorrect = errors.New("Cipher text is not a multiple of the block size ") + func MD5(src []byte) []byte + func NewRSAKeys(bits int) (publicKey []byte, privateKey []byte, err error) + func SHA1(src []byte) []byte + func SHA256(src []byte) []byte + func SHA512(src []byte) []byte + type Coder interface + Decrypt func([]byte) ([]byte, error) + Encrypt func([]byte) ([]byte, error) + func NewAESCoderWithCBC(key, iv []byte) (Coder, error) + func NewAESCoderWithECB(key []byte) (Coder, error) + type RSADecoder interface + Decrypt func([]byte) ([]byte, error) + Sign func(msg []byte) ([]byte, error) + func NewRSADecoder(privKey []byte) RSADecoder + type RSAEncoder interface + Encrypt func([]byte) ([]byte, error) + VerifySign func(msg, sign []byte) bool + func NewRSAEncoder(pubKey []byte) RSAEncoder