I've got this piece of js code which I need to convert to proper java code for usage in my Android app:
toHex(Crypto.util.bytesToBase64(Crypto.SHA1(password, { asBytes: true })));
I've found out that for the Crypto.util.bytesToBase64()
method, I can use the java version: Base64.encode()
, but I've got no clue how to call the js CryptoSHA1()
and toHex()
methods in java. Any ideas?