SqlColumnEncryptionKeyStoreProvider.VerifyColumnMasterKeyMetadataAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
When implemented in a derived class, asynchronously verifies the specified signature is valid for the column master key with the specified key path and the specified enclave behavior. The default implementation returns a faulted task with NotImplementedException.
public virtual System.Threading.Tasks.Task<bool> VerifyColumnMasterKeyMetadataAsync(string masterKeyPath, bool allowEnclaveComputations, byte[] signature, System.Threading.CancellationToken cancellationToken = default);
abstract member VerifyColumnMasterKeyMetadataAsync : string * bool * byte[] * System.Threading.CancellationToken -> System.Threading.Tasks.Task<bool>
override this.VerifyColumnMasterKeyMetadataAsync : string * bool * byte[] * System.Threading.CancellationToken -> System.Threading.Tasks.Task<bool>
Public Overridable Function VerifyColumnMasterKeyMetadataAsync (masterKeyPath As String, allowEnclaveComputations As Boolean, signature As Byte(), Optional cancellationToken As CancellationToken = Nothing) As Task(Of Boolean)
Parameters
- masterKeyPath
- String
The column master key path. The path format is specific to the key store provider implementation (e.g. a thumbprint for the certificate store, or a key identifier URL for Azure Key Vault).
- allowEnclaveComputations
- Boolean
Indicates whether the column master key supports enclave computations. This value must match what was passed to SignColumnMasterKeyMetadata(String, Boolean) when the signature was generated.
- signature
- Byte[]
The signature to verify, as previously returned by SignColumnMasterKeyMetadata(String, Boolean). The format is provider-specific.
- cancellationToken
- CancellationToken
A token to cancel the asynchronous operation.
Returns
A task that, when completed, returns true if the
specified signature is valid, or false if it is
not valid.
Remarks
The default implementation first checks the cancellationToken and returns a canceled task if cancellation has been requested. Otherwise, it calls the synchronous VerifyColumnMasterKeyMetadata(String, Boolean, Byte[]) method, which throws a NotImplementedException by default. In this case, the returned task will be faulted with NotImplementedException rather than throwing synchronously.
Derived classes that perform I/O should override this method with a truly asynchronous implementation that honors the cancellation token.