Advertisement
Mysoft

Untitled

Dec 26th, 2015
685
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function HashPass(sPass as string) as ulong
  2.   dim as ulong iHash = &hDEADBEEF+(len(sPass) shl 17)
  3.   dim as integer iLast = 0
  4.   for CNT as integer = 0 to len(sPass)-1
  5.     for I2 as integer = 0 to sPass[CNT]+1+iLast
  6.       asm rol dword ptr [iHash], 3
  7.       iHash += sPass[CNT]*(CNT+1)
  8.       iLast = (sPass[CNT] and (15))+(sPass[CNT] shr 4)
  9.     next I2
  10.   next CNT
  11.   return iHash
  12. end function
  13.  
  14. print hex$(HashPass("gr"))
  15. print hex$(HashPass("rg"))
  16. print
  17. print hex$(HashPass("banana"))
  18. print hex$(HashPass("aaannb"))
  19. print
  20. print hex$(HashPass("a"))
  21. print hex$(HashPass("pa"))
  22. print hex$(HashPass("paa"))
  23. print hex$(HashPass("pasa"))
  24. print hex$(HashPass("passa"))
  25. print hex$(HashPass("passwa"))
  26. print hex$(HashPass("passwoa"))
  27. print hex$(HashPass("passwora"))
  28. print hex$(HashPass("passworda"))
  29. sleep
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement