?? passwordhashing.bas
字號:
Attribute VB_Name = "PasswordHashing"
'****************************************************************************
'人人為我,我為人人
'枕善居漢化收藏整理
'發布日期:2007/03/15
'描 述:SINE256加密可視化以及控制示例
'網 站:http://www.Mndsoft.com/ (VB6源碼博客)
'網 站:http://www.VbDnet.com/ (VB.NET源碼博客,主要基于.NET2005)
'e-mail :Mndsoft@163.com
'e-mail :Mndsoft@126.com
'OICQ :88382850
' 如果您有新的好的代碼別忘記給枕善居哦!
'****************************************************************************
Option Explicit
Public Function MakePasswordHash(pass As String) As Double 'The function that processe a number from a string
'The goal here is to mess around with the string and make it complicate
'You can make 100 page of this if you wanted to
'This value does not need to be reversed so you can make fun a long time
If pass = "" Then pass = "None"
Dim bPass() As Byte 'The password in byte (Byte array is very fast)
Dim uHold() As Double
Dim undValue As Double
undValue = 3.14159265 'lets start with Pi value... Why not :/
bPass = StrConv(pass, vbFromUnicode) 'convert the password string to byte array
Dim i As Long
ReDim uHold(0 To UBound(bPass)) 'Resize the other var
For i = 0 To UBound(bPass) 'lets start messing around
uHold(i) = (bPass(i) ^ 1.003) Mod 256687 'bleh
undValue = (undValue + ((Len(pass) / 3.1416))) Mod 18168256
undValue = (undValue + uHold(i)) Mod 16168256
undValue = undValue / Oct(Len(pass))
undValue = undValue * (Sin(i) + 1)
Next
'Well thats enuff for now
'Lets test this out ;)
MakePasswordHash = Round(undValue * (1048 / 3)) Mod 1048 'Make it a value between 0 and 255 .. i dont know why, just for fun ;)
End Function
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -