I am trying to send a data hashed using SCryptUtil provided by com.lambdaworks.crypto.SCryptUtil, convert it into array of bytes and send it to the stellar network using ManageDataOperation.Builder
My code is as follows
String hash = SCryptUtil.scrypt("HashData", 16384, 8, 1);
byte[] hashByte = hash.getBytes();
ManageDataOperation.Builder updateHashedData = new ManageDataOperation.Builder("Hashed Data", hashByte);
Transaction tt = new Transaction.Builder(sourceAccount)
.addOperation(updateHashedData.build())
.addMemo(Memo.text("Test
Transaction")).setTimeout(1000).build();
The data is not sent to the server. But when I use a simple string for the "hash" variable like "Password", it gets sent. What am I missing here? Is there a way to send long hashcodes to stellar account in this way?
hash
, assign it tohashedData
, but you don't use that variable after that. You use the bytes from a new variable,hashedPass
in the builder call. Where doeshashedPass
get set? What's in it?hashByte
?