Versions in this module Expand all Collapse all v0 v0.0.10 Mar 15, 2023 Changes in this version + const MaxFileBlock + func NewECBDecrypt(b cipher.Block) cipher.BlockMode + type BaseStruct struct + Err error + func (e BaseStruct) String() string + func (e BaseStruct) ToBase32Bytes() []byte + func (e BaseStruct) ToBase32String() string + func (e BaseStruct) ToBase64Bytes() []byte + func (e BaseStruct) ToBase64String() string + func (e BaseStruct) ToBytes() []byte + func (e BaseStruct) ToHexBytes() []byte + func (e BaseStruct) ToHexString() string + func (e BaseStruct) ToString() string + type Cipher struct + Err error + PrivateKey []byte + PublicKey []byte + func NewCipher() *Cipher + func (c *Cipher) PKCS5Padding(src []byte) []byte + func (c *Cipher) PKCS5UnPadding(src []byte) []byte + func (c *Cipher) PKCS7Padding(src []byte, size int) []byte + func (c *Cipher) PKCS7UnPadding(src []byte) []byte + func (c *Cipher) Padding(src []byte, blockSize int) []byte + func (c *Cipher) RSAGeneratePrivateKey(bits int) *Cipher + func (c *Cipher) RSAGeneratePublicKey(priKeyOption ...[]byte) *Cipher + func (c *Cipher) SetIV(iv interface{}) *Cipher + func (c *Cipher) SetKey(key interface{}) *Cipher + func (c *Cipher) SetMode(mode ModeType) *Cipher + func (c *Cipher) SetPadding(padding PaddingType) *Cipher + func (c *Cipher) SetPrivateKey(key interface{}) *Cipher + func (c *Cipher) SetPublicKey(key interface{}) *Cipher + func (c *Cipher) UnPadding(src []byte) []byte + func (c *Cipher) ZeroPadding(src []byte, size int) []byte + func (c *Cipher) ZeroUnPadding(src []byte) []byte + type Decrypt struct + func NewDecrypt() Decrypt + func (e Decrypt) ByAes(c *Cipher) Decrypt + func (e Decrypt) ByDes(c *Cipher) Decrypt + func (e Decrypt) ByRC4(c *Cipher) Decrypt + func (e Decrypt) ByRSA(c *Cipher) Decrypt + func (e Decrypt) ByTripleDes(c *Cipher) Decrypt + func (e Decrypt) ByXor(key []byte) Decrypt + func (e Decrypt) FromBase32Byte(b []byte) Decrypt + func (e Decrypt) FromBase32String(s string) Decrypt + func (e Decrypt) FromBase64Byte(b []byte) Decrypt + func (e Decrypt) FromBase64String(s string) Decrypt + func (e Decrypt) FromBytes(b []byte) Decrypt + func (e Decrypt) FromFile(f interface{}) Decrypt + func (e Decrypt) FromHexByte(b []byte) Decrypt + func (e Decrypt) FromHexString(s string) Decrypt + func (e Decrypt) FromString(s string) Decrypt + type Encrypt struct + func NewEncrypt() Encrypt + func (e Encrypt) ByAes(c *Cipher) Encrypt + func (e Encrypt) ByDes(c *Cipher) Encrypt + func (e Encrypt) ByRC4(c *Cipher) Encrypt + func (e Encrypt) ByRSA(c *Cipher) Encrypt + func (e Encrypt) ByTripleDes(c *Cipher) Encrypt + func (e Encrypt) ByXor(key []byte) Encrypt + func (e Encrypt) FromBytes(b []byte) Encrypt + func (e Encrypt) FromFile(f interface{}) Encrypt + func (e Encrypt) FromString(s string) Encrypt + type ModeType string + const CBC + const CFB + const CTR + const ECB + const OFB + const RSA_OAEP_MD5 + const RSA_OAEP_SHA1 + const RSA_OAEP_SHA256 + const RSA_OAEP_SHA384 + const RSA_OAEP_SHA512 + const RSA_PKCS1_V1_5 + func (m *ModeType) CBC() ModeType + func (m *ModeType) CFB() ModeType + func (m *ModeType) CTR() ModeType + func (m *ModeType) ECB() ModeType + func (m *ModeType) OFB() ModeType + func (m *ModeType) RsaOaepMD5() ModeType + func (m *ModeType) RsaOaepSHA1() ModeType + func (m *ModeType) RsaOaepSHA256() ModeType + func (m *ModeType) RsaOaepSHA384() ModeType + func (m *ModeType) RsaOaepSHA512() ModeType + type PaddingType string + const No + const PKCS5 + const PKCS7 + const Zero + func (p *PaddingType) No() PaddingType + func (p *PaddingType) PKCS5() PaddingType + func (p *PaddingType) PKCS7() PaddingType + func (p *PaddingType) Zero() PaddingType