I needed to generate the hash in Java and then check it in C#. How to get the same output from these two algorithms when converting back to a string?
------------C#------------
?
------------Java------------
public static String encrypt(String value) throws NoSuchAlgorithmException {
private static final String ALGORITHM = "SHA-256";
private static final String[] UPDATES = "goKpRF61ApDDJN9m0OOwHtU9G56psEqJjPUdiH3kZto=";
MessageDigest md = MessageDigest.getInstance(ALGORITHM);
for (int i = 0; i < UPDATES.length; i++) {
md.update(UPDATES[i].getBytes());
}
return Base64.getEncoder().encodeToString(md.digest(value.getBytes()));
}