public UnencryptedMessage(byte[] messageBytes, bool messageIsText = false) { MessageBytes = messageBytes; MessageText = messageIsText ? Encoding.UTF8.GetString(messageBytes, 0, messageBytes.Length) : ByteToHexStringConverter.ToHexString(messageBytes); MessageIsText = messageIsText; }
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 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; }
public IEnumerable <byte> ToBytes() { return(ByteToHexStringConverter.ToBytesFromHexString(_hexData)); }
public BinaryHexString(IEnumerable <byte> data) { _hexData = ByteToHexStringConverter.ToHexString(data); }
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)); }