public UnencryptedMessage(string messageText, bool messageIsText = true) { MessageBytes = messageIsText ? Encoding.UTF8.GetBytes(messageText) : ByteToHexStringConverter.ToBytesFromHexString(messageText).ToArray(); MessageText = messageText; MessageIsText = messageIsText; }
private Message(string message, bool isText, bool isPrunable, BinaryHexString messageHash) { IsText = isText; MessageText = message; IsPrunable = isPrunable; MessageHash = messageHash; Data = IsText ? Encoding.UTF8.GetBytes(message) : ByteToHexStringConverter.ToBytesFromHexString(message).ToArray(); }
public IEnumerable <byte> ToBytes() { return(ByteToHexStringConverter.ToBytesFromHexString(_hexData)); }