Documentation ¶
Index ¶
- type Cryptor
- type PassThroughCryptor
- func (PassThroughCryptor) Decrypt(cipherText []byte, key string) ([]byte, error)
- func (PassThroughCryptor) DecryptString(cipherText string, key string) (string, error)
- func (PassThroughCryptor) Encrypt(plainText []byte, key string) ([]byte, error)
- func (PassThroughCryptor) EncryptString(plainText string, key string) (string, error)
- type RealCryptor
- func (c RealCryptor) Decrypt(cipherText []byte, key string) ([]byte, error)
- func (c RealCryptor) DecryptString(cipherText string, key string) (string, error)
- func (c RealCryptor) Encrypt(plainText []byte, key string) ([]byte, error)
- func (c RealCryptor) EncryptString(plainText string, key string) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cryptor ¶
type Cryptor interface { EncryptString(plainText string, key string) (string, error) Encrypt(plainText []byte, key string) ([]byte, error) DecryptString(cipherText string, key string) (string, error) Decrypt(cipherText []byte, key string) ([]byte, error) }
For background and implementation: See here: https://appscode.appscode.io/diffusion/100/
type PassThroughCryptor ¶
type PassThroughCryptor struct{}
func (PassThroughCryptor) Decrypt ¶
func (PassThroughCryptor) Decrypt(cipherText []byte, key string) ([]byte, error)
func (PassThroughCryptor) DecryptString ¶
func (PassThroughCryptor) DecryptString(cipherText string, key string) (string, error)
func (PassThroughCryptor) Encrypt ¶
func (PassThroughCryptor) Encrypt(plainText []byte, key string) ([]byte, error)
func (PassThroughCryptor) EncryptString ¶
func (PassThroughCryptor) EncryptString(plainText string, key string) (string, error)
type RealCryptor ¶
type RealCryptor struct{}
func (RealCryptor) Decrypt ¶
func (c RealCryptor) Decrypt(cipherText []byte, key string) ([]byte, error)
func (RealCryptor) DecryptString ¶
func (c RealCryptor) DecryptString(cipherText string, key string) (string, error)
func (RealCryptor) Encrypt ¶
func (c RealCryptor) Encrypt(plainText []byte, key string) ([]byte, error)
func (RealCryptor) EncryptString ¶
func (c RealCryptor) EncryptString(plainText string, key string) (string, error)
Click to show internal directories.
Click to hide internal directories.