/// <summary>
        /// Hashes a password with a specific version of the password hasher so we can check
        /// backwards compatability.
        /// </summary>
        private string HashPasswordWithVersion(string password, PasswordHashVersion passwordHashVersion)
        {
            switch (passwordHashVersion)
            {
            case PasswordHashVersion.V1:
                return(new PasswordCryptographyV1().CreateHash(password));

            case PasswordHashVersion.V2:
                return(Defuse.PasswordCryptographyV2.CreateHash(password));

            case PasswordHashVersion.V3:
                return(new PasswordHasher <PasswordHasherUser>().HashPassword(new PasswordHasherUser(), password));

            default:
                throw new NotSupportedException("PasswordEncryptionVersion not recognised: " + passwordHashVersion.ToString());
            }
        }