ASP implementation of SHA256 encryption

Source: Internet
Author: User
Tags exit
Encryption <%
Private M_lonbits (30)
Private M_l2power (30)
Private K (63)
Private Const Bits_to_a_byte = 8
Private Const Bytes_to_a_word = 4
Private Const Bits_to_a_word = 32
M_lonbits (0) = CLng (1)
M_lonbits (1) = CLng (3)
M_lonbits (2) = CLng (7)
M_lonbits (3) = CLng (15)
M_lonbits (4) = CLng (31)
M_lonbits (5) = CLng (63)
M_lonbits (6) = CLng (127)
M_lonbits (7) = CLng (255)
M_lonbits (8) = CLng (511)
M_lonbits (9) = CLng (1023)
M_lonbits (+) = CLng (2047)
M_lonbits (one) = CLng (4095)
M_lonbits (a) = CLng (8191)
M_lonbits (+) = CLng (16383)
M_lonbits (+) = CLng (32767)
M_lonbits (+) = CLng (65535)
M_lonbits (+) = CLng (131071)
M_lonbits (+) = CLng (262143)
M_lonbits (km) = CLng (524287)
M_lonbits (a) = CLng (1048575)
M_lonbits (+) = CLng (2097151)
M_lonbits = CLng (4194303)
M_lonbits (+) = CLng (8388607)
M_lonbits (+) = CLng (16777215)
M_lonbits (+) = CLng (33554431)
M_lonbits (+) = CLng (67108863)
M_lonbits (num) = CLng (134217727)
M_lonbits (+) = CLng (268435455)
M_lonbits = CLng (536870911)
M_lonbits (+) = CLng (1073741823)
M_lonbits (+) = CLng (2147483647)
M_l2power (0) = CLng (1)
M_l2power (1) = CLng (2)
M_l2power (2) = CLng (4)
M_l2power (3) = CLng (8)
M_l2power (4) = CLng (16)
M_l2power (5) = CLng (32)
M_l2power (6) = CLng (64)
M_l2power (7) = CLng (128)
M_l2power (8) = CLng (256)
M_l2power (9) = CLng (512)
M_l2power (+) = CLng (1024)
M_l2power (one) = CLng (2048)
M_l2power (a) = CLng (4096)
M_l2power (+) = CLng (8192)
M_l2power (+) = CLng (16384)
M_l2power (+) = CLng (32768)
M_l2power (+) = CLng (65536)
M_l2power (+) = CLng (131072)
M_l2power (km) = CLng (262144)
M_l2power (a) = CLng (524288)
M_l2power (+) = CLng (1048576)
M_l2power = CLng (2097152)
M_l2power (+) = CLng (4194304)
M_l2power (+) = CLng (8388608)
M_l2power (+) = CLng (16777216)
M_l2power (+) = CLng (33554432)
M_l2power (num) = CLng (67108864)
M_l2power (+) = CLng (134217728)
M_l2power = CLng (268435456)
M_l2power (+) = CLng (536870912)
M_l2power (+) = CLng (1073741824)

K (0) = &h428a2f98
K (1) = &h71374491
K (2) = &AMP;HB5C0FBCF
K (3) = &he9b5dba5
K (4) = &h3956c25b
K (5) = &h59f111f1
K (6) = &h923f82a4
K (7) = &hab1c5ed5
K (8) = &hd807aa98
K (9) = &h12835b01
K (Ten) = &h243185be
K (one) = &AMP;H550C7DC3
K (a) = &h72be5d74
K = &h80deb1fe
K = &h9bdc06a7
K = &hc19bf174
K = &he49b69c1
K (&hefbe4786) =
K = &hfc19dc6
K = &h240ca1cc
K = &h2de92c6f
K = &AMP;H4A7484AA
K = &AMP;H5CB0A9DC
K (+) = &h76f988da
K = &h983e5152
K = &ha831c66d
K = &hb00327c8
K (+) = &hbf597fc7
K = &hc6e00bf3
K () = &hd5a79147
K = &h6ca6351
K (To) = &h14292967
K (+) = &h27b70a85
K () = &h2e1b2138
K (&AMP;H4D2C6DFC) =
K (km) = &AMP;H53380D13
K (+) = &h650a7354
K (Panax) = &h766a0abb
K (&h81c2c92e) =
K (&h92722c85) =
K = &AMP;HA2BFE8A1
K (a) = &ha81a664b
K (km) = &hc24b8b70
K (a) = &hc76c51a3
K = &hd192e819
K (a) = &hd6990624
K (+) = &hf40e3585
K = &h106aa070
K (+) = &h19a4c116
K (+) = &AMP;H1E376C08
K = &h2748774c
K (Wuyi) = &AMP;H34B0BCB5
K () = &AMP;H391C0CB3
K (+) = &h4ed8aa4a
K (SI) = &h5b9cca4f
K (+) = &AMP;H682E6FF3
K (a) = &h748f82ee
K = &h78a5636f
K (%) = &h84c87814
K (&h8cc70208) =
K (a) = &h90befffa
K (%) = &ha4506ceb
K (+) = &hbef9a3f7
K () = &hc67178f2
Private Function LShift (LValue, Ishiftbits)
If ishiftbits = 0 Then
LShift = LValue
Exit Function
ElseIf ishiftbits = Then
If LValue and 1 Then
LShift = &h80000000
Else
LShift = 0
End If
Exit Function
ElseIf ishiftbits < 0 Or ishiftbits > Then
Err.Raise 6
End If

If (LValue and M_l2power (31-ishiftbits)) Then
LShift = ((LValue and M_lonbits ()-(ishiftbits + 1)) * M_l2power (ishiftbits)) Or &h80000000
Else
LShift = ((LValue and M_lonbits (31-ishiftbits)) * M_l2power (ishiftbits))
End If



Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.