But now I can find new part of code in retriveAccountInfo:
Code: Select all
MessageDigest md = MessageDigest.getInstance("SHA");
byte[] raw = password.getBytes(StandardCharsets.UTF_8);
String hashBase64 = Base64.getEncoder().encodeToString(md.digest(raw));
Example:
Code: Select all
$byte;
$bytes = array();
for($i = 0; $i < strlen($pwd); $i++){
$bytes[] = ord($pwd[$i]);
$byte += ord($pwd[$i]);
}
print_r($bytes);
Code: Select all
const char[] password = Base64(SHA($byte)); // This's example, not php method
P.S. find method how I can do it. But I dont fully understand how it works in J.
Code: Select all
var_dump( base64_encode( pack( 'H*', sha1( $pwd ) ) ) ); // PHP