How to use Bitcoinj to authenticate signed messages?

1

I'd like to authenticate from java code on a website that makes use of javascript/ajax authentication like below:

var key = new Bitcoin.ECKey(Crypto.util.hexToBytes(SHA256(password)));
var signed_challenge = Crypto.util.bytesToHex(key.sign(Crypto.util.hexToBytes(SHA256(challenge_key))));

I found that the library bitcoinj offers classes like ECKey, but I don't know what I might use as replacement for CryptoJS here?

Maybe you could help me translating the JS to Java?

membersound

Posted 2014-02-13T13:36:22.047

Reputation: 111

1Maybe reword the question to "How to use Bitcoinj to authenticate signed messages?"John T 2014-02-13T18:55:48.073

No answers