public async Task <bool> Verify(KeyVaultAlgorithm algorithm, byte[] digest, byte[] signature) { if (!algorithm.CanSignOrVerify()) { throw new InvalidOperationException("Cannot verify with this algorithm type."); } return(await Client.VerifyAsync(Identifier.Identifier, algorithm.GetConfigurationString(), digest, signature)); }
public async Task <byte[]> Sign(KeyVaultAlgorithm algorithm, byte[] digest) { if (!algorithm.CanSignOrVerify()) { throw new InvalidOperationException("Cannot sign with this algorithm type."); } return((await Client.SignAsync(Identifier.Identifier, algorithm.GetConfigurationString(), digest)).Result); }