package
0.0.0-20190211104632-e863c7060b76
Repository: https://github.com/keithballdotnet/go-kms.git
Documentation: pkg.go.dev
# Functions
AesGCMDecrypt Decrypt data using AES with the GCM cipher mode (Gives Confidentiality and Authenticity).
AesGCMEncrypt Encrypt data using AES with the GCM cipher mode (Gives Confidentiality and Authenticity).
AuthorizeRequest - Will check the request authorization.
DeriveKey will generate a AES key from a passphrase.
exit will return an error code and the reason to the os.
GetHmac256 will generate a HMAC hash encoded to base64.
Get a random number.
InitConfig read several Environment variables and based on them initialise the configuration.
NewHSMMasterKeyProvider.
NewHSMMasterKeyProvider.
NewKMSCryptoProvider.
Generate a Random secret encoded as a b32 string If the length is <= 0, a default length of 10 bytes will be used, which will generate a secret of length 16.
Get the request address.
SetConfig will check any required settings for this crypto-provider.
SetConfig will check any required settings for this crypto-provider.
SetKMSCryptoConfig will check any required settings for this crypto-provider.
SetupAuthenticationKey - This deals with setting an auth key for the service.
Start - Will set up and start the server.
StartListener start a HTTP listener.
# Structs
Context information for Marshaled calls.
CreateKeyRequest.
CreateKeyResponse.
DecryptRequest.
DecryptResponse.
DisableKeyRequest.
DisableKeyResponse.
EnableKeyRequest.
EnableKeyResponse.
EncryptRequest.
EncryptResponse.
GenerateDataKeyRequest.
GenerateDataKeyResponse.
GoKMSMasterKeyProvider is an implementation of aquiring a MASTER key using a derived key.
HSMMasterKeyProvider is an implementation of aquiring a MASTER key using a connection to a Hardware Security Module.
Key is a represention of a key.
KeyMetadata is the associated meta data of any key.
KMSCryptoProvider is an implementation of encryption using a local storage.
listKeysHandler.
ListKeysResponse.
ReEncryptRequest.
ReEncryptResponse.
# Interfaces
CryptoProvider provides an interface for crypto provider solutions.
MasterKeyProvider provides a mechanism to load a master key.