Documentation
¶
Index ¶
- func DecryptOnceWithPasswordAndSalt(password, salt, encodedData []byte) ([]byte, error)
- func DecryptOnceWithPrivateKey(privateKeyData, encodedData []byte) ([]byte, error)
- func EncryptOnceWithPasswordAndSalt(password, salt, decodedData []byte) ([]byte, error)
- func EncryptOnceWithPublicKey(publicKey []byte, decodedData []byte) ([]byte, error)
- func IsSaltedHashOf(hash, data string) bool
- func NewDecrypterWithPasswordAndSalt(password, salt []byte, out io.Writer) io.WriteCloser
- func NewEncrypterWithPasswordAndSalt(password, salt []byte, out io.Writer) io.WriteCloser
- func PublicKeyFromPrivateKey(privateKey []byte) (string, error)
- func RandomSalt(size int) (string, error)
- func RandomSaltedHash(data string) (string, error)
- func Salt(salt, data string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecryptOnceWithPasswordAndSalt ¶
DecryptOnceWithPasswordAndSalt decrypts a single blob of data with an AES decrypter initialized by password and salt
func DecryptOnceWithPrivateKey ¶
DecryptOnceWithPrivateKey decrypts a single blob of data using an RSA private key
func EncryptOnceWithPasswordAndSalt ¶ added in v0.0.3
EncryptOnceWithPasswordAndSalt encrypts a single blob of data with an AES decrypter initialized by password and salt
func EncryptOnceWithPublicKey ¶ added in v0.0.3
EncryptOnceWithPublicKey encrypts a single blob of data using an RSA public key
func IsSaltedHashOf ¶
IsSaltedHashOf returns true if hash is a salted hash of data
func NewDecrypterWithPasswordAndSalt ¶ added in v0.0.3
func NewDecrypterWithPasswordAndSalt(password, salt []byte, out io.Writer) io.WriteCloser
NewDecrypterWithPasswordAndSalt returns an AES decrypter initialized by password and salt
func NewEncrypterWithPasswordAndSalt ¶ added in v0.0.3
func NewEncrypterWithPasswordAndSalt(password, salt []byte, out io.Writer) io.WriteCloser
func PublicKeyFromPrivateKey ¶ added in v0.0.2
PublicKeyFromPrivateKey generates the public key corresponding to a given private key
func RandomSalt ¶ added in v0.0.3
func RandomSaltedHash ¶ added in v0.0.3
Types ¶
This section is empty.