public function splitSalt($hash) {
        // The hash is in the form: <32 char hash><salt>.
        $salt_length = strlen($hash) - 32;
        $salt = trim(substr($hash, -$salt_length, $salt_length));
        $stored_hash = substr($hash, 0, strlen($hash) - $salt_length);

        return [$stored_hash, $salt];
    }