Documentation
¶
Index ¶
- type BatchRequestItem
- type DecryptBatchResponseItem
- type EncryptBatchResponseItem
- type Transit
- func (t Transit) CheckEngine(engineName string) bool
- func (t Transit) CreateKey(ctx context.Context, name, keyType, engineName string) error
- func (t Transit) Decrypt(ctx context.Context, key, engineName string, req BatchRequestItem) (DecryptBatchResponseItem, error)
- func (t Transit) DeleteKey(ctx context.Context, name, engineName string) error
- func (t Transit) Encrypt(ctx context.Context, key, engineName string, req BatchRequestItem) (EncryptBatchResponseItem, error)
- func (t Transit) GetKey(ctx context.Context, name, engineName string) (*keysutil.Policy, error)
- func (t Transit) HMAC(ctx context.Context, keyName, inputB64, algo string, keyVersion int, ...) (string, error)
- func (t Transit) Hash(ctx context.Context, inputB64 string, algo structs.HashType, format string) (string, error)
- func (t Transit) ListKeys(ctx context.Context, engineName string) ([]string, error)
- func (t *Transit) Sign(ctx context.Context, req *structs.SignParameters) (*structs.SignResponse, error)
- func (t *Transit) VerifySign(ctx context.Context, req *structs.VerificationRequest) (*structs.VerificationResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BatchRequestItem ¶
type BatchRequestItem struct { // Context for key derivation. This is required for derived keys. Context string `json:"context" structs:"context" mapstructure:"context"` // DecodedContext is the base64 decoded version of Context DecodedContext []byte // Plaintext for encryption Plaintext string `json:"plaintext" structs:"plaintext" mapstructure:"plaintext"` // Ciphertext for decryption Ciphertext string `json:"ciphertext" structs:"ciphertext" mapstructure:"ciphertext"` // Nonce to be used when v1 convergent encryption is used Nonce string `json:"nonce" structs:"nonce" mapstructure:"nonce"` // The key version to be used for encryption KeyVersion int `json:"key_version" structs:"key_version" mapstructure:"key_version"` // DecodedNonce is the base64 decoded version of Nonce DecodedNonce []byte }
BatchRequestItem represents a request item for batch processing
type DecryptBatchResponseItem ¶
type DecryptBatchResponseItem struct { // Plaintext for the ciphertext present in the corresponding batch // request item Plaintext string `json:"plaintext" structs:"plaintext" mapstructure:"plaintext"` }
type EncryptBatchResponseItem ¶
type EncryptBatchResponseItem struct { // Ciphertext for the plaintext present in the corresponding batch // request item Ciphertext string `json:"ciphertext,omitempty" structs:"ciphertext" mapstructure:"ciphertext"` // KeyVersion defines the key version used to encrypt plaintext. KeyVersion int `json:"key_version,omitempty" structs:"key_version" mapstructure:"key_version"` }
EncryptBatchResponseItem represents a response item for batch processing
type Transit ¶
type Transit struct {
// contains filtered or unexported fields
}
func (Transit) CheckEngine ¶
func (Transit) Decrypt ¶
func (t Transit) Decrypt(ctx context.Context, key, engineName string, req BatchRequestItem) (DecryptBatchResponseItem, error)
func (Transit) Encrypt ¶
func (t Transit) Encrypt(ctx context.Context, key, engineName string, req BatchRequestItem) (EncryptBatchResponseItem, error)
func (*Transit) Sign ¶
func (t *Transit) Sign(ctx context.Context, req *structs.SignParameters) (*structs.SignResponse, error)
func (*Transit) VerifySign ¶
func (t *Transit) VerifySign(ctx context.Context, req *structs.VerificationRequest) (*structs.VerificationResponse, error)
Click to show internal directories.
Click to hide internal directories.