Beispiel #1
0
 /// <summary>
 /// Decrypts a ciphertext using current <see cref="VirgilKey"/> and verifies one
 /// using specified <see cref="VirgilCard"/>.
 /// </summary>
 /// <param name="virgilKey">The <see cref="VirgilKey"/>, that represents a Private key.</param>
 /// <param name="ciphertext">The ciphertext in base64 encoded string.</param>
 /// <param name="signerCard">The signer's <see cref="VirgilCard"/>, that represents a
 /// Public key and user/device information.</param>
 /// <returns>A new <see cref="VirgilBuffer"/> instance with decrypted data.</returns>
 public static VirgilBuffer DecryptThenVerify(this VirgilKey virgilKey, string ciphertext, VirgilCard signerCard)
 {
     return(virgilKey.DecryptThenVerify(VirgilBuffer.From(ciphertext, StringEncoding.Base64), signerCard));
 }
Beispiel #2
0
 /// <summary>
 /// Decrypts a ciphertext using current <see cref="VirgilKey"/> and verifies one
 /// using specified <see cref="VirgilCard"/>.
 /// </summary>
 /// <param name="virgilKey">The <see cref="VirgilKey"/>, that represents a Private key.</param>
 /// <param name="cipherdata">The ciphertext in base64 encoded string.</param>
 /// <param name="signerCard">The signer's <see cref="VirgilCard"/>, that represents a
 /// Public key and user/device information.</param>
 /// <returns>A new <see cref="VirgilBuffer"/> instance with decrypted data.</returns>
 public static VirgilBuffer DecryptThenVerify(this VirgilKey virgilKey, byte[] cipherdata, VirgilCard signerCard)
 {
     return(virgilKey.DecryptThenVerify(new VirgilBuffer(cipherdata), signerCard));
 }