CryptographyClient.DecryptAsync 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.
Overloads
DecryptAsync(EncryptionAlgorithm, Byte[], CancellationToken) |
Decrypts the specified ciphertext. |
DecryptAsync(DecryptParameters, CancellationToken) |
Decrypts ciphertext. |
DecryptAsync(EncryptionAlgorithm, Byte[], CancellationToken)
- Source:
- CryptographyClient.cs
- Source:
- CryptographyClient.cs
Decrypts the specified ciphertext.
public virtual System.Threading.Tasks.Task<Azure.Security.KeyVault.Keys.Cryptography.DecryptResult> DecryptAsync (Azure.Security.KeyVault.Keys.Cryptography.EncryptionAlgorithm algorithm, byte[] ciphertext, System.Threading.CancellationToken cancellationToken = default);
abstract member DecryptAsync : Azure.Security.KeyVault.Keys.Cryptography.EncryptionAlgorithm * byte[] * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Security.KeyVault.Keys.Cryptography.DecryptResult>
override this.DecryptAsync : Azure.Security.KeyVault.Keys.Cryptography.EncryptionAlgorithm * byte[] * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Security.KeyVault.Keys.Cryptography.DecryptResult>
Public Overridable Function DecryptAsync (algorithm As EncryptionAlgorithm, ciphertext As Byte(), Optional cancellationToken As CancellationToken = Nothing) As Task(Of DecryptResult)
Parameters
- algorithm
- EncryptionAlgorithm
The EncryptionAlgorithm to use.
- ciphertext
- Byte[]
The encrypted data to decrypt.
- cancellationToken
- CancellationToken
A CancellationToken to cancel the operation.
Returns
The result of the decrypt operation. The returned DecryptResult contains the encrypted data along with information regarding the algorithm and key used to decrypt it.
Exceptions
The specified algorithm
does not match the key corresponding to the key identifier.
The local cryptographic provider threw an exception.
The key is invalid for the current operation.
The operation is not supported with the specified key.
The server returned an error. See Message for details returned from the server.
Applies to
DecryptAsync(DecryptParameters, CancellationToken)
- Source:
- CryptographyClient.cs
- Source:
- CryptographyClient.cs
Decrypts ciphertext.
public virtual System.Threading.Tasks.Task<Azure.Security.KeyVault.Keys.Cryptography.DecryptResult> DecryptAsync (Azure.Security.KeyVault.Keys.Cryptography.DecryptParameters decryptParameters, System.Threading.CancellationToken cancellationToken = default);
abstract member DecryptAsync : Azure.Security.KeyVault.Keys.Cryptography.DecryptParameters * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Security.KeyVault.Keys.Cryptography.DecryptResult>
override this.DecryptAsync : Azure.Security.KeyVault.Keys.Cryptography.DecryptParameters * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Security.KeyVault.Keys.Cryptography.DecryptResult>
Public Overridable Function DecryptAsync (decryptParameters As DecryptParameters, Optional cancellationToken As CancellationToken = Nothing) As Task(Of DecryptResult)
Parameters
- decryptParameters
- DecryptParameters
A DecryptParameters containing the data to decrypt and other parameters for algorithm-dependent decryption.
- cancellationToken
- CancellationToken
A CancellationToken to cancel the operation.
Returns
The result of the decrypt operation. The returned DecryptResult contains the encrypted data along with information regarding the algorithm and key used to decrypt it.
Exceptions
The specified algorithm does not match the key corresponding to the key identifier.
decryptParameters
is null.
The local cryptographic provider threw an exception.
The key is invalid for the current operation.
The operation is not supported with the specified key.
The server returned an error. See Message for details returned from the server.
Applies to
Azure SDK for .NET
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기