Documentation
¶
Overview ¶
Package encrypt implement common encrypt and decrypt
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Cipher ¶
Cipher implement write and read cipher.Stream
func NewCipher ¶
NewCipher new cipher method support:
aes-128-cfb aes-192-cfb aes-256-cfb aes-128-ctr aes-192-ctr aes-256-ctr aes-128-ofb aes-192-ofb aes-256-ofb des-cfb des-ctr des-ofb blowfish-cfb blowfish-ctr blowfish-ofb cast5-cfb cast5-ctr cast5-ofb twofish-128-cfb twofish-192-cfb twofish-256-cfb twofish-128-ctr twofish-192-ctr twofish-256-ctr twofish-128-ofb twofish-192-ofb twofish-256-ofb tea-cfb tea-ctr tea-ofb xtea-cfb xtea-ctr xtea-ofb rc4-md5 rc4-md5-6 chacha20 chacha20-ietf salsa20
type CipherInfo ¶
type CipherInfo struct { KeyLen int IvLen int NewStream func(key, iv []byte, encrypt bool) (cipher.Stream, error) }
CipherInfo cipher information
func GetCipherInfo ¶
func GetCipherInfo(method string) (info CipherInfo, ok bool)
GetCipherInfo 根据方法获得 Cipher information
Click to show internal directories.
Click to hide internal directories.