Package com.azure.storage.blob.models
Class CustomerProvidedKey
java.lang.Object
com.azure.storage.blob.models.CustomerProvidedKey
Contains the customer provided key information used to encrypt a blob's content on the server.
-
Constructor Summary
ConstructorDescriptionCustomerProvidedKey
(byte[] key) Creates a new wrapper for a client provided key.Creates a new wrapper for a client provided key. -
Method Summary
Modifier and TypeMethodDescriptionGets the algorithm to use this key with.getKey()
Gets the encryption key.Gets the encryption key's hash.
-
Constructor Details
-
CustomerProvidedKey
Creates a new wrapper for a client provided key.- Parameters:
key
- The encryption key encoded as a base64 string.- Throws:
RuntimeException
- If "SHA-256" cannot be found.
-
CustomerProvidedKey
public CustomerProvidedKey(byte[] key) Creates a new wrapper for a client provided key.- Parameters:
key
- The encryption key bytes.- Throws:
RuntimeException
- If "SHA-256" cannot be found.
-
-
Method Details
-
getKey
Gets the encryption key.- Returns:
- A base64 encoded string of the encryption key.
-
getKeySha256
Gets the encryption key's hash.- Returns:
- A base64 encoded string of the encryption key hash.
-
getEncryptionAlgorithm
Gets the algorithm to use this key with.- Returns:
- A label for the encryption algorithm, as understood by Azure Storage.
-