Documentation ¶
Index ¶
- func LoadRSAPrivateKey(pemFile string) (*rsa.PrivateKey, error)
- func LoadRSAPublicKey(pemFile string) (*rsa.PublicKey, error)
- func MaxEncryptSize(pubkey *rsa.PublicKey) int
- func RSADecrypt(privkey *rsa.PrivateKey, data []byte) ([]byte, error)
- func RSAEncrypt(pubkey *rsa.PublicKey, data []byte) ([]byte, error)
- type BlockCryptor
- func NewAESCFB(key, iv []byte) BlockCryptor
- func NewCrypt(name string, key, iv []byte) BlockCryptor
- func NewNoneCrypt(key, iv []byte) BlockCryptor
- func NewSM4(key, iv []byte) BlockCryptor
- func NewSalsa20(key, nonce []byte) BlockCryptor
- func NewTripleDES(key, iv []byte) BlockCryptor
- func NewTwofish(key, iv []byte) BlockCryptor
- func NewXTEA(key, iv []byte) BlockCryptor
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RSADecrypt ¶
func RSADecrypt(privkey *rsa.PrivateKey, data []byte) ([]byte, error)
Types ¶
type BlockCryptor ¶
func NewCrypt ¶
func NewCrypt(name string, key, iv []byte) BlockCryptor
func NewNoneCrypt ¶
func NewNoneCrypt(key, iv []byte) BlockCryptor
func NewSalsa20 ¶
func NewSalsa20(key, nonce []byte) BlockCryptor
Source Files ¶
Click to show internal directories.
Click to hide internal directories.