Documentation ¶
Index ¶
- func CrypterFromKeyID(CseKmsID string, CseKmsRegion string) crypto.Crypter
- type Crypter
- type SymmetricKey
- func (symmetricKey *SymmetricKey) Decrypt() error
- func (symmetricKey *SymmetricKey) Encrypt() error
- func (symmetricKey *SymmetricKey) Generate() error
- func (symmetricKey *SymmetricKey) GetEncryptedKey() []byte
- func (symmetricKey *SymmetricKey) GetEncryptedKeyLen() int
- func (symmetricKey *SymmetricKey) GetKey() []byte
- func (symmetricKey *SymmetricKey) GetKeyID() string
- func (symmetricKey *SymmetricKey) GetKeyLen() int
- func (symmetricKey *SymmetricKey) SetEncryptedKey(encryptedKey []byte) error
- func (symmetricKey *SymmetricKey) SetKey(key []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Crypter ¶
type Crypter struct {
SymmetricKey crypto.SymmetricKey
}
Crypter is AWS KMS Crypter implementation
type SymmetricKey ¶
type SymmetricKey struct { SymmetricKey []byte SymmetricKeyLen int EncryptedSymmetricKey []byte EncryptedSymmetricKeyLen int KeyID string Region string // contains filtered or unexported fields }
SymmetricKey is AWS KMS implementation of crypto.SymmetricKey interface
func NewSymmetricKey ¶
func NewSymmetricKey(kmsKeyID string, keyLen int, encryptedKeyLen int, kmsRegion string) *SymmetricKey
NewSymmetricKey creates new symmetric AWS KMS key object
func (*SymmetricKey) Decrypt ¶
func (symmetricKey *SymmetricKey) Decrypt() error
Decrypt symmetric key with AWS KMS
func (*SymmetricKey) Encrypt ¶
func (symmetricKey *SymmetricKey) Encrypt() error
Encrypt symmetric key with AWS KMS
func (*SymmetricKey) Generate ¶
func (symmetricKey *SymmetricKey) Generate() error
Generate symmetric key
func (*SymmetricKey) GetEncryptedKey ¶
func (symmetricKey *SymmetricKey) GetEncryptedKey() []byte
GetEncryptedKey returns encrypted symmetric key
func (*SymmetricKey) GetEncryptedKeyLen ¶
func (symmetricKey *SymmetricKey) GetEncryptedKeyLen() int
GetEncryptedKeyLen returns encrypted key length
func (*SymmetricKey) GetKey ¶
func (symmetricKey *SymmetricKey) GetKey() []byte
GetKey returna unencrypted symmetric key
func (*SymmetricKey) GetKeyID ¶
func (symmetricKey *SymmetricKey) GetKeyID() string
GetKeyID returns AWS KMS key ID
func (*SymmetricKey) GetKeyLen ¶
func (symmetricKey *SymmetricKey) GetKeyLen() int
GetKeyLen returns key length
func (*SymmetricKey) SetEncryptedKey ¶
func (symmetricKey *SymmetricKey) SetEncryptedKey(encryptedKey []byte) error
SetEncryptedKey set encrypted symmetric key
func (*SymmetricKey) SetKey ¶
func (symmetricKey *SymmetricKey) SetKey(key []byte) error
SetKey set unencrypted symmetric key
Click to show internal directories.
Click to hide internal directories.