Ejemplo n.º 1
0
        private string GenerateAccountIdentifier(string userEmail)
        {
            var newIdentifier = HashKeccak.createHashOf(
                userEmail,
                128
                ).Substring(0, 10);


            return(newIdentifier);
        }
Ejemplo n.º 2
0
        private string GenerateNewTransactionIdentifier()
        {
            var identifierSeed = RandomNumberGenerator.GetInt32(int.MaxValue);
            var newIdentifier  = HashKeccak.createHashOf(
                identifierSeed.ToString(),
                128
                ).Substring(0, 16);


            return(newIdentifier);
        }
Ejemplo n.º 3
0
        private string GenerateNewPassword(User user)
        {
            var passwordGenerationSeed = RandomNumberGenerator.GetInt32(int.MaxValue);
            var newPassword            = HashKeccak.createHashOf(
                passwordGenerationSeed.ToString(),
                128
                ).Substring(0, 16);

            usersTable.UpdateUserPassword(user, newPassword);

            return(newPassword);
        }