Ejemplo n.º 1
0
        public string Encrypt(string value, TypeCripto type)
        {
            if (type == TypeCripto.Hash128)
            {
                return(ComputeHash128(value));
            }

            if (type == TypeCripto.Hash512)
            {
                return(ComputeHash512(value));
            }

            return(string.Empty);
        }
Ejemplo n.º 2
0
        public string Encrypt(string value, TypeCripto type, string salt)
        {
            if (type == TypeCripto.Hash128)
            {
                return(ComputeHash128(value, salt));
            }

            if (type == TypeCripto.Hash512)
            {
                return(ComputeHash512(value, salt));
            }

            if (type == TypeCripto.MD5Hash)
            {
                return(EncryptMD5HashString(value, salt));
            }

            return(string.Empty);
        }