Code for ASP Cryptographic functions

Source: Internet
Author: User

<%

Private Const Bits_to_a_byte = 8

Private Const Bytes_to_a_word = 4

Private Const Bits_to_a_word =

Private M_lonbits (30)

Private M_l2power (30)

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

End Function

Private Function rshift (LValue, Ishiftbits)

If ishiftbits = 0 Then

rshift = LValue

Exit Function

ElseIf ishiftbits = Then

If LValue and &h80000000 Then

Rshift = 1

Else

rshift = 0

End If

Exit Function

ElseIf ishiftbits < 0 Or ishiftbits > Then

Err.Raise 6

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.