Versions in this module Expand all Collapse all v1 v1.0.0 Mar 12, 2024 Changes in this version + var ErrDataBroken = errors.New("data broken, first byte is not zero") + var ErrDataLen = errors.New("data length error") + var ErrDataToLarge = errors.New("message too long for RSA public key size") + var ErrDecryption = errors.New("decryption error") + var ErrKeyPairDismatch = errors.New("data is not encrypted by the private key") + var ErrPrivateKey = errors.New("get private key error") + var ErrPublicKey = errors.New("get public key error") + func Decrypt(strTobeDeCrypted string, args ...string) (string, error) + func Encrypt(strTobeEnCrypted string, args ...string) (string, error) + func EncryptPwd(password string, ivs ...string) (string, error) + func RsaSignWithPrivateKey(origData, private_key_bts []byte) (bts []byte, err error) + type Cipher struct + func New(mode string, attrs map[string]interface{}) (c *Cipher, err error) + func (c *Cipher) Decrypt(src []byte) (out []byte, err error) + func (c *Cipher) DecryptFromString(src string) (out []byte, err error) + func (c *Cipher) Encrypt(bts []byte) (out []byte, err error) + func (c *Cipher) EncryptToString(bts []byte) (out string, err error) + type DesCrypter struct + type TripleDesCrypter struct