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 GetEncrypter([]byte) (cipher.AEAD, error) GetDecrypter([]byte) (cipher.AEAD, error) }
func Chacha20Poly1305 ¶
func Chacha20Poly1305(key []byte, saltSize int) (AEADCipher, error)
func NewAEADCipher ¶
func NewAEADCipher(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 GetEncrypter([]byte) (cipher.Stream, error) GetDecrypter([]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.