Documentation ¶
Index ¶
- func DecryptAESCBC(reader io.Reader, privateKey *rsa.PrivateKey, encryptedKeyFile string) (io.ReadCloser, error)
- func DecryptAESCBCWithIV(reader io.ReadCloser, privateKey *rsa.PrivateKey, encryptedKeyB64 string, ...) (io.ReadCloser, error)
- func LoadPrivateKey(privateKeyBase64 string) (*rsa.PrivateKey, error)
- func ValidateKeyPair(pub string, privkey rsa.PrivateKey) (bool, error)
- type DecryptionKeys
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecryptAESCBC ¶
func DecryptAESCBC(reader io.Reader, privateKey *rsa.PrivateKey, encryptedKeyFile string) (io.ReadCloser, error)
Decrypts a file encrypted with AES (key length depends on input) in CBC block chaining mode and PKCS#7 padding. The provided key must be encoded in base16, and the first block of the input is the IV. The output is a pipe reader that can be used to stream the decrypted file.
func DecryptAESCBCWithIV ¶
func DecryptAESCBCWithIV(reader io.ReadCloser, privateKey *rsa.PrivateKey, encryptedKeyB64 string, iv []byte) (io.ReadCloser, error)
func LoadPrivateKey ¶ added in v0.11.0
func LoadPrivateKey(privateKeyBase64 string) (*rsa.PrivateKey, error)
func ValidateKeyPair ¶ added in v0.11.0
func ValidateKeyPair(pub string, privkey rsa.PrivateKey) (bool, error)
Types ¶
type DecryptionKeys ¶ added in v0.11.0
type DecryptionKeys struct { DecryptKey *rsa.PrivateKey EncryptedKey string }
Click to show internal directories.
Click to hide internal directories.