Ejemplo n.º 1
0
    public static SqlString xfn_IntCrypt_SHA512_Encoding_UTF8(SqlString s)
    {
        try
        {
            IntCryptLib crypt     = new IntCryptLib(Encoding.UTF8);
            SqlString   strResult = crypt.SHA512_Encoding(s.ToString());

            return(strResult);
        }
        catch (Exception)
        {
        }

        return(null);
    }
Ejemplo n.º 2
0
    public static SqlString xfn_IntCrypt_MD5_Encoding(SqlString s)
    {
        try
        {
            IntCryptLib crypt     = new IntCryptLib();
            SqlString   strResult = crypt.MD5_Encoding(s.ToString());

            return(strResult);
        }
        catch (Exception)
        {
        }

        return(null);
    }
Ejemplo n.º 3
0
    public static SqlString xfn_IntCrypt_Encrypt_UTF8(SqlString strDomain, SqlString strApp, SqlString s)
    {
        try
        {
            byte[] key = null;
            byte[] iv  = null;
            GetKeyManager().GetKeyIv(strDomain.ToString(), strApp.ToString(), ref key, ref iv);

            IntCryptLib crypt     = new IntCryptLib(Encoding.UTF8);
            SqlString   strResult = crypt.AES_Encrypt(key, iv, s.ToString());

            return(strResult);
        }
        catch (Exception)
        {
        }

        return(null);
    }