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?