Пример #1
0
 public UnencryptedMessage(byte[] messageBytes, bool messageIsText = false)
 {
     MessageBytes = messageBytes;
     MessageText  = messageIsText
         ? Encoding.UTF8.GetString(messageBytes, 0, messageBytes.Length)
         : ByteToHexStringConverter.ToHexString(messageBytes);
     MessageIsText = messageIsText;
 }
Пример #2
0
 public UnencryptedMessage(string messageText, bool messageIsText = true)
 {
     MessageBytes = messageIsText
         ? Encoding.UTF8.GetBytes(messageText)
         : ByteToHexStringConverter.ToBytesFromHexString(messageText).ToArray();
     MessageText   = messageText;
     MessageIsText = messageIsText;
 }
Пример #3
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();
        }
 public MessageToBeEncryptedToSelf(IEnumerable <byte> messageBytes, bool compress)
     : base(ByteToHexStringConverter.ToHexString(messageBytes), false, compress)
 {
 }
 public MessageToBeEncrypted(IEnumerable <byte> messageBytes, bool compressMessage, bool isPrunable = false)
     : base(ByteToHexStringConverter.ToHexString(messageBytes), false, compressMessage, isPrunable)
 {
 }
 public UnencryptedMessage(IEnumerable <byte> messageBytes, bool isPrunable = false)
 {
     MessageIsText = false;
     Message       = ByteToHexStringConverter.ToHexString(messageBytes);
     IsPrunable    = isPrunable;
 }
Пример #7
0
 public IEnumerable <byte> ToBytes()
 {
     return(ByteToHexStringConverter.ToBytesFromHexString(_hexData));
 }
Пример #8
0
 public BinaryHexString(IEnumerable <byte> data)
 {
     _hexData = ByteToHexStringConverter.ToHexString(data);
 }
Пример #9
0
 public async Task <VerifyPrunableMessageReply> VerifyPrunableMessage(ulong transactionId,
                                                                      IEnumerable <byte> message, ulong?requireBlock = null, ulong?requireLastBlock = null)
 {
     return(await VerifyPrunableMessage(transactionId, ByteToHexStringConverter.ToHexString(message),
                                        false, requireBlock, requireLastBlock));
 }