【调度系统】广东民航医疗快线调度系统源代码
wanglizhong
2025-05-05 2a11acffdd3df927be6abace9e8155e370b49681
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<%
Function sha1(instr)
  Dim asc, enc, bytes, outstr, pos
  'Borrow some objects from .NET (supported from 1.1 onwards)
  Set asc = Server.CreateObject("System.Text.UTF8Encoding")
  Set enc = Server.CreateObject( _
      "System.Security.Cryptography.SHA1CryptoServiceProvider")
 
  'Convert the string to a byte array and hash it
  bytes = asc.GetBytes_4(instr)
  bytes = enc.ComputeHash_2((bytes))
 
  outstr = ""
 
  'Convert the byte array to a hex string
  For pos = 1 To Lenb(bytes)
    outstr = outstr & LCase(Right("0" & Hex(Ascb(Midb(bytes, pos, 1))), 2))
  Next
  sha1 = outstr
  Set enc = Nothing
  Set asc = Nothing
End Function
%>