First: Note this is an implementation detail. We don’t promise that this format stays compatible over versions, and with a default client you would see that the password on Windows is crypted in this file.
In the current implementation the hash string is constructed in subversion/libsvn_subr/config_auth.c’s function svn_auth__file_path()
[[
svn_error_t *
svn_auth__file_path(const char **path,
const char *cred_kind,
const char *realmstring,
const char *config_dir,
apr_pool_t *pool)
{
const char *authdir_path, *hexname;
svn_checksum_t *checksum;
/* Construct the path to the directory containing the creds files,
e.g. "~/.subversion/auth/svn.simple". The last component is
simply the cred_kind. */
SVN_ERR(svn_config_get_user_config_path(&authdir_path, config_dir,
SVN_CONFIG__AUTH_SUBDIR, pool));
if (authdir_path)
{
authdir_path = svn_dirent_join(authdir_path, cred_kind, pool);
/* Construct the basename of the creds file. It's just the
realmstring converted into an md5 hex string. */
SVN_ERR(svn_checksum(&checksum, svn_checksum_md5, realmstring,
strlen(realmstring), pool));
hexname = svn_checksum_to_cstring(checksum, pool);
*path = svn_dirent_join(authdir_path, hexname, pool);
}
else
*path = NULL;
return SVN_NO_ERROR;
}
]]
So we calculate the md5 hash over the realm string in UTF-8 form (your first guess)
But as noted: you should not rely on this. This format may change at any time.
Functions like svn_config_walk_auth_data() provide a stable api against future versions, while this storage will probably change at some point, and is certainly incompatible with other backends like keychains, etc.
Bert