Documentation ¶
Overview ¶
nolint
Index ¶
- Constants
- type AESKey
- func (aesKey *AESKey) Bytes() ([]byte, error)
- func (aesKey *AESKey) Decrypt(crypted []byte) ([]byte, error)
- func (aesKey *AESKey) DecryptWithOpts(crypted []byte, opts *crypto.EncOpts) ([]byte, error)
- func (aesKey *AESKey) Encrypt(plain []byte) ([]byte, error)
- func (aesKey *AESKey) EncryptWithOpts(plain []byte, opts *crypto.EncOpts) ([]byte, error)
- func (aesKey *AESKey) String() (string, error)
- func (aesKey *AESKey) Type() crypto.KeyType
Constants ¶
View Source
const ( AES_GCM_IV_LENGTH = 12 AES_GCM_TAG_LENGTH = 16 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AESKey ¶
type AESKey struct {
Key []byte
}
func (*AESKey) Decrypt ¶
The input ciphertext can be ASN1 encoded, or of the form:
nonce + ciphertext + tag (can be nil)
func (*AESKey) DecryptWithOpts ¶
func (*AESKey) Encrypt ¶
The ciphertext returned by Encrypt() and EncryptWithOpts can be ASN1 encoded, or of the form:
nonce + ciphertext + tag (can be nil)
func (*AESKey) EncryptWithOpts ¶
Click to show internal directories.
Click to hide internal directories.