QueueEncryptionPolicy Class
- java.
lang. Object - com.
microsoft. azure. storage. queue. QueueEncryptionPolicy
- com.
public class QueueEncryptionPolicy
Represents a queue encryption policy that is used to perform envelope encryption/decryption of Azure queue messages.
Field Summary
Modifier and Type | Field and Description |
---|---|
IKey |
keyResolver
The IKeyResolver used to select the correct key for decrypting existing queue messages. |
IKey |
keyWrapper
An object of type IKey that is used to wrap/unwrap the content key during encryption. |
Constructor Summary
Constructor | Description |
---|---|
QueueEncryptionPolicy(IKey key, IKeyResolver keyResolver) |
Initializes a new instance of the QueueEncryptionPolicy class with the specified key and resolver. If the generated policy is intended to be used for encryption, users are expected to provide a key at the minimum. The absence of key will cause an exception to be thrown during encryption. If the generated policy is intended to be used for decryption, users can provide a keyResolver. The client library will - 1. Invoke the key resolver if specified to get the key. 2. If resolver is not specified but a key is specified, match the key id on the key and use it. |
Method Summary
Modifier and Type | Method and Description |
---|---|
IKey |
getKey()
Gets the IKey that is used to wrap/unwrap the content key during encryption. |
IKey |
getKeyResolver()
Gets the key resolver used to select the correct key for decrypting existing queue messages. |
void |
setKey(IKey key)
Sets the IKey that is used to wrap/unwrap the content key during encryption. |
void |
setKeyResolver(IKeyResolver keyResolver)
Sets the key resolver used to select the correct key for decrypting existing queue messages. |
Field Details
keyResolver
public IKeyResolver keyResolver
The IKeyResolver used to select the correct key for decrypting existing queue messages.
keyWrapper
public IKey keyWrapper
An object of type IKey that is used to wrap/unwrap the content key during encryption.
Constructor Details
QueueEncryptionPolicy
public QueueEncryptionPolicy(IKey key, IKeyResolver keyResolver)
Initializes a new instance of the QueueEncryptionPolicy class with the specified key and resolver.
If the generated policy is intended to be used for encryption, users are expected to provide a key at the minimum. The absence of key will cause an exception to be thrown during encryption. If the generated policy is intended to be used for decryption, users can provide a keyResolver. The client library will - 1. Invoke the key resolver if specified to get the key. 2. If resolver is not specified but a key is specified, match the key id on the key and use it.
Parameters:
Method Details
getKey
public IKey getKey()
Gets the IKey that is used to wrap/unwrap the content key during encryption.
Returns:
getKeyResolver
public IKeyResolver getKeyResolver()
Gets the key resolver used to select the correct key for decrypting existing queue messages.
Returns:
setKey
public void setKey(IKey key)
Sets the IKey that is used to wrap/unwrap the content key during encryption.
Parameters:
setKeyResolver
public void setKeyResolver(IKeyResolver keyResolver)
Sets the key resolver used to select the correct key for decrypting existing queue messages.
Parameters: