Documentation ¶
Index ¶
- func AESDecrypt(ciphertext, key []byte) ([]byte, error)
- func AESDecryptStream(key []byte, input io.Reader, output io.Writer) error
- func AESDecryptStream2(key []byte, input io.Reader, output io.Writer) error
- func AESEncrypt(plaintext, key []byte) ([]byte, error)
- func AESEncryptStream(key []byte, input io.Reader, output io.Writer) error
- func AESEncryptStream2(key []byte, input io.Reader, output io.Writer) error
- func DecryptByPrivateRSA(message []byte, privateKey, algo string) ([]byte, error)
- func EncryptByPublicRSA(message []byte, publicKey, algo string) ([]byte, error)
- func Hash(src io.Reader) ([]byte, error)
- func HashFile(filename string) (string, error)
- func MakeAESKey(size int) ([]byte, error)
- func NewAESDecryptWriter(key []byte, output io.Writer) io.Writer
- func NewAESEncryptWriter(key []byte, output io.Writer) io.Writer
- func PrivateKey(privateKey string) (*rsa.PrivateKey, error)
- func PublicKey(publicKey string) (*rsa.PublicKey, error)
- func RSAKeyPair(size int) (string, string, error)
- func SSHKeyPair(size int, pubKeyPath, privateKeyPath string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AESDecrypt ¶
func AESDecryptStream2 ¶
func AESEncrypt ¶
func AESEncryptStream2 ¶
func DecryptByPrivateRSA ¶
DecryptByPrivateRSA decrypt message using Private key
func EncryptByPublicRSA ¶
EncryptByPublicRSA encrypts using Public key and message
func PrivateKey ¶
func PrivateKey(privateKey string) (*rsa.PrivateKey, error)
PrivateKey gets the encoded version of private key and returns a rsa.PrivateKey struct
func PublicKey ¶
PublicKey gets the encoded version of public key and returns a rsa.PublicKey struct
func RSAKeyPair ¶
RSAKeyPair returns a pair of encoded string version of public/private keys
func SSHKeyPair ¶
SSHKeyPair returns pair of public and private key in format of ssh
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.