Ejemplo n.º 1
0
 /// <summary>
 /// Decrypts a single block of encrypted data.
 /// </summary>
 /// <param name="algorithm">The JWK encryption algorithm.</param>
 /// <param name="content">The content to be decrypted.</param>
 /// <return>The decrypted value.</return>
 async Task <byte[]> Microsoft.Azure.Management.KeyVault.Fluent.IKey.DecryptAsync(JsonWebKeyEncryptionAlgorithm algorithm, byte[] content, CancellationToken cancellationToken)
 {
     return(await this.DecryptAsync(algorithm, content, cancellationToken));
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Decrypts a single block of encrypted data.
 /// </summary>
 /// <param name="algorithm">The JWK encryption algorithm.</param>
 /// <param name="content">The content to be decrypted.</param>
 /// <return>The decrypted value.</return>
 byte[] Microsoft.Azure.Management.KeyVault.Fluent.IKey.Decrypt(JsonWebKeyEncryptionAlgorithm algorithm, params byte[] content)
 {
     return(this.Decrypt(algorithm, content));
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Unwraps a symmetric key wrapped originally by this Key Vault key.
 /// </summary>
 /// <param name="algorithm">The JWK encryption algorithm.</param>
 /// <param name="key">The key to unwrap.</param>
 /// <return>The unwrapped symmetric key.</return>
 byte[] Microsoft.Azure.Management.KeyVault.Fluent.IKey.UnwrapKey(JsonWebKeyEncryptionAlgorithm algorithm, params byte[] key)
 {
     return(this.UnwrapKey(algorithm, key));
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Unwraps a symmetric key wrapped originally by this Key Vault key.
 /// </summary>
 /// <param name="algorithm">The JWK encryption algorithm.</param>
 /// <param name="key">The key to unwrap.</param>
 /// <return>The unwrapped symmetric key.</return>
 async Task <byte[]> Microsoft.Azure.Management.KeyVault.Fluent.IKey.UnwrapKeyAsync(JsonWebKeyEncryptionAlgorithm algorithm, byte[] key, CancellationToken cancellationToken)
 {
     return(await this.UnwrapKeyAsync(algorithm, key, cancellationToken));
 }
Ejemplo n.º 5
0
        ///GENMHASH:EC3E3FD471B61CC3A76CA417659849DB:F53D9841C2432144FB7FEDD4CDBFD5F9
        public async Task <byte[]> EncryptAsync(JsonWebKeyEncryptionAlgorithm algorithm, byte[] content, CancellationToken cancellationToken = default(CancellationToken))
        {
            var result = await vault.Client.EncryptAsync(Inner.KeyIdentifier.Identifier, algorithm.Value, content, cancellationToken);

            return(result.Result);
        }
Ejemplo n.º 6
0
 ///GENMHASH:68E43175FD1572C39912FBCB105BF169:0533E9B624D1DC48D9B75883F9A63688
 public byte[] Decrypt(JsonWebKeyEncryptionAlgorithm algorithm, params byte[] content)
 {
     return(Extensions.Synchronize(() => DecryptAsync(algorithm, content)));
 }
Ejemplo n.º 7
0
 ///GENMHASH:53615EE168ABC0D3B17DDF1E300061BE:E0088DEF3B6727A81BFDBF63F112FD97
 public byte[] WrapKey(JsonWebKeyEncryptionAlgorithm algorithm, params byte[] key)
 {
     return(Extensions.Synchronize(() => WrapKeyAsync(algorithm, key)));
 }