Internal Authentication Password Encoding

Ok, done by a function equivalent to this:

    public static String sha256PasswordSalt(String password) {
        Random rand = new Random();
        String salt = String.format("%08X", rand.nextInt());
        String hashedPass = SecurityUtils.sha256(password + salt);
        return String.format("[%s]%s", salt, hashedPass);
    }

edit: hang on, gotta see if the sha256 function does anything unexpected...
edit2: nope, just does sha256 on the input and returns the hex-formatted string you see in the table.

1 Like