Blame vendor/github.com/Azure/azure-storage-blob-go/azblob/request_common.go

Packit Service 3a6627
package azblob
Packit Service 3a6627
Packit Service 3a6627
// ClientProvidedKeyOptions contains headers which may be be specified from service version 2019-02-02
Packit Service 3a6627
// or higher to encrypts the data on the service-side with the given key. Use of customer-provided keys
Packit Service 3a6627
// must be done over HTTPS. As the encryption key itself is provided in the request, a secure connection
Packit Service 3a6627
// must be established to transfer the key.
Packit Service 3a6627
// Note: Azure Storage does not store or manage customer provided encryption keys. Keys are securely discarded
Packit Service 3a6627
// as soon as possible after they’ve been used to encrypt or decrypt the blob data.
Packit Service 3a6627
// https://docs.microsoft.com/en-us/azure/storage/common/storage-service-encryption
Packit Service 3a6627
// https://docs.microsoft.com/en-us/azure/storage/common/customer-managed-keys-overview
Packit Service 3a6627
type ClientProvidedKeyOptions struct {
Packit Service 3a6627
	// A Base64-encoded AES-256 encryption key value.
Packit Service 3a6627
	EncryptionKey *string
Packit Service 3a6627
Packit Service 3a6627
	// The Base64-encoded SHA256 of the encryption key.
Packit Service 3a6627
	EncryptionKeySha256 *string
Packit Service 3a6627
Packit Service 3a6627
	// Specifies the algorithm to use when encrypting data using the given key. Must be AES256.
Packit Service 3a6627
	EncryptionAlgorithm EncryptionAlgorithmType
Packit Service 3a6627
Packit Service 3a6627
	// Specifies the name of the encryption scope to use to encrypt the data provided in the request
Packit Service 3a6627
	// https://docs.microsoft.com/en-us/azure/storage/blobs/encryption-scope-overview
Packit Service 3a6627
	// https://docs.microsoft.com/en-us/azure/key-vault/general/overview
Packit Service 3a6627
	EncryptionScope *string
Packit Service 3a6627
}
Packit Service 3a6627
Packit Service 3a6627
// NewClientProvidedKeyOptions function.
Packit Service 3a6627
// By default the value of encryption algorithm params is "AES256" for service version 2019-02-02 or higher.
Packit Service 3a6627
func NewClientProvidedKeyOptions(ek *string, eksha256 *string, es *string) (cpk ClientProvidedKeyOptions) {
Packit Service 3a6627
	cpk = ClientProvidedKeyOptions{}
Packit Service 3a6627
	cpk.EncryptionKey, cpk.EncryptionKeySha256, cpk.EncryptionAlgorithm, cpk.EncryptionScope = ek, eksha256, EncryptionAlgorithmAES256, es
Packit Service 3a6627
	return cpk
Packit Service 3a6627
}