示例#1
0
 /// <summary>
 /// The hybrid decrypt.
 /// </summary>
 /// <param name="crypted">
 /// The crypted.
 /// </param>
 /// <param name="key">
 /// The key.
 /// </param>
 /// <returns>
 /// The <see cref="string"/>.
 /// </returns>
 public string HybridDecrypt(Message crypted, PrivateKey key)
 {
     string secretKeyData = this.Decrypt(crypted.Key, key);
     SecretKey secretKey = this.keyMaster.DecodeSecretKey(secretKeyData);
     string message = this.Decrypt(crypted.Data, secretKey);
     return message;
 }
示例#2
0
 /// <summary>
 /// The symmetric decrypt.
 /// </summary>
 /// <param name="crypted">
 /// The crypted.
 /// </param>
 /// <returns>
 /// The <see cref="string"/>.
 /// </returns>
 public string SymmetricDecrypt(Message crypted)
 {
     SecretKey key = this.keyMaster.DecodeSecretKey(crypted.Key);
     return this.Decrypt(crypted.Data, key);
 }
示例#3
0
 /// <summary>
 /// The public decrypt.
 /// </summary>
 /// <param name="crypted">
 /// The crypted.
 /// </param>
 /// <param name="key">
 /// The key.
 /// </param>
 /// <returns>
 /// The <see cref="string"/>.
 /// </returns>
 public string PublicDecrypt(Message crypted, PrivateKey key)
 {
     return this.Decrypt(crypted.Data, key);
 }