示例#1
0
 public UnencryptedMessage(string messageText, bool messageIsText = true)
 {
     MessageBytes = messageIsText
         ? Encoding.UTF8.GetBytes(messageText)
         : ByteToHexStringConverter.ToBytesFromHexString(messageText).ToArray();
     MessageText   = messageText;
     MessageIsText = messageIsText;
 }
示例#2
0
        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();
        }
示例#3
0
 public IEnumerable <byte> ToBytes()
 {
     return(ByteToHexStringConverter.ToBytesFromHexString(_hexData));
 }