/// <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; }
/// <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); }
/// <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); }