internal static byte[] DecryptMessage( SecHandle context, EncryptedMessage message, int sequence_no) { SecurityBuffer buffer = new SecurityBufferInOut(SecurityBufferType.Data, message.Message); DecryptMessage(context, new[] { buffer }, message.Signature, sequence_no); return(buffer.ToArray()); }
internal static byte[] DecryptMessage( SecHandle context, EncryptedMessage message, int sequence_no) { if (message is null) { throw new ArgumentNullException(nameof(message)); } SecurityBuffer buffer = new SecurityBufferInOut(SecurityBufferType.Data, message.Message); DecryptMessage(context, new[] { buffer }, message.Signature, sequence_no); return(buffer.ToArray()); }
/// <summary> /// Decrypt a message for this context. /// </summary> /// <param name="message">The message to decrypt.</param> /// <param name="sequence_no">The sequence number.</param> /// <returns>The decrypted message.</returns> public byte[] DecryptMessage(EncryptedMessage message, int sequence_no) { return(SecurityContextUtils.DecryptMessage(Context, message, sequence_no)); }