TableEncryptionPolicy Class

  • java.lang.Object
    • com.microsoft.azure.storage.table.TableEncryptionPolicy

public class TableEncryptionPolicy

Represents a table encryption policy that is used to perform envelope encryption/decryption of Azure table entities.

Field Summary

Modifier and Type Field and Description
IKeyResolver keyResolver

The IKeyResolver used to select the correct key for decrypting existing table entities.

IKey keyWrapper

An object of type IKey that is used to wrap/unwrap the content key during encryption.

Constructor Summary

Constructor Description
TableEncryptionPolicy(IKey key, IKeyResolver keyResolver)

Initializes a new instance of the TableEncryptionPolicy 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.

IKeyResolver getKeyResolver()

Gets the key resolver used to select the correct key for decrypting existing table entities.

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 table entities.

Field Details

keyResolver

public IKeyResolver keyResolver

The IKeyResolver used to select the correct key for decrypting existing table entities.

keyWrapper

public IKey keyWrapper

An object of type IKey that is used to wrap/unwrap the content key during encryption.

Constructor Details

TableEncryptionPolicy

public TableEncryptionPolicy(IKey key, IKeyResolver keyResolver)

Initializes a new instance of the TableEncryptionPolicy 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:

key - An object of type IKey that is used to wrap/unwrap the content encryption key.
keyResolver - The key resolver used to select the correct key for decrypting existing table entities.

Method Details

getKey

public IKey getKey()

Gets the IKey that is used to wrap/unwrap the content key during encryption.

Returns:

An IKey object.

getKeyResolver

public IKeyResolver getKeyResolver()

Gets the key resolver used to select the correct key for decrypting existing table entities.

Returns:

A resolver that returns an IKey given a keyId.

setKey

public void setKey(IKey key)

Sets the IKey that is used to wrap/unwrap the content key during encryption.

Parameters:

key - An IKey object.

setKeyResolver

public void setKeyResolver(IKeyResolver keyResolver)

Sets the key resolver used to select the correct key for decrypting existing table entities.

Parameters:

keyResolver - A resolver that returns an IKey given a keyId.

Applies to