Documentation ¶
Index ¶
- func GetCipher(method, password string) (sc StreamCipher, ac AEADCipher, err error)
- func Kdf(password string, keyLen int) []byte
- type AEADCipher
- type StreamCipher
- func AESCFB(key []byte, ivSize int) (StreamCipher, error)
- func AESCTR(key []byte, ivSize int) (StreamCipher, error)
- func BFCFB(key []byte, ivSize int) (StreamCipher, error)
- func CHACHA20(key []byte, ivSize int) (StreamCipher, error)
- func CHACHA20IETF(key []byte, ivSize int) (StreamCipher, error)
- func NewStreamCipher(method, password string) (StreamCipher, error)
- func RC4MD5(key []byte, ivSize int) (StreamCipher, error)
- func SALSA20(key []byte, ivSize int) (StreamCipher, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetCipher ¶
func GetCipher(method, password string) (sc StreamCipher, ac AEADCipher, err error)
Types ¶
type AEADCipher ¶
type AEADCipher interface { KeySize() int SaltSize() int Encrypter([]byte) (cipher.AEAD, error) Decrypter([]byte) (cipher.AEAD, error) }
func CHACHA20POLY1305 ¶
func CHACHA20POLY1305(key []byte, saltSize int) (AEADCipher, error)
func NewAEADipher ¶
func NewAEADipher(method, password string) (AEADCipher, error)
func XCHACHA20POLY1305 ¶
func XCHACHA20POLY1305(key []byte, saltSize int) (AEADCipher, error)
type StreamCipher ¶
type StreamCipher interface { KeySize() int IVSize() int Key() []byte Encrypter([]byte) (cipher.Stream, error) Decrypter([]byte) (cipher.Stream, error) }
func CHACHA20IETF ¶
func CHACHA20IETF(key []byte, ivSize int) (StreamCipher, error)
func NewStreamCipher ¶
func NewStreamCipher(method, password string) (StreamCipher, error)
Click to show internal directories.
Click to hide internal directories.