The Code-Bin
Links
Home
Add your code!
All Listings
About
Latest Entry
Featured Scripts
Author's Website
Latest Entries
FFMPEG Thumbnail Scr...
PHP, 0.8KB
Jul. 29, 10:24pm
John
Z80 Assembler, 190 bytes
Feb. 17, 3:36am
John
Z80 Assembler, 176 bytes
Sep. 13, 2:19am
John
Z80 Assembler, 77 bytes
Sep. 13, 2:18am
John
Z80 Assembler, 209 bytes
Sep. 13, 2:17am
untitled PHP Code
Posted by: elrkgj | October 31, 2010 @ 4:51am
PHP Code
[
Download
]
<?php //------------------------------------------------------------------------------------ function evalCrossTotal($strMD5) { $intTotal = 0; $arrMD5Chars = str_split($strMD5, 1); foreach ($arrMD5Chars as $value) { $intTotal += '0x0'.$value; } return $intTotal; }//----------------------------------------------------------------------------------- //------------------------------------------------------------------------------------ function encryptString($strString, $strPassword) { // $strString is the content of the entire file with serials $strPasswordMD5 = md5($strPassword); $intMD5Total = evalCrossTotal($strPasswordMD5); $arrEncryptedValues = array(); $intStrlen = strlen($strString); for ($i=0; $i<$intStrlen; $i++) { $arrEncryptedValues[] = ord(substr($strString, $i, 1)) + ('0x0' . substr($strPasswordMD5, $i%32, 1)) - $intMD5Total; $intMD5Total = evalCrossTotal(substr(md5(substr($strString,0,$i+1)), 0, 16) . substr(md5($intMD5Total), 0, 16)); } return implode(' ' , $arrEncryptedValues); }//----------------------------------------------------------------------------------- ?>
Syntax Highlighting
[
Open in new window
]
Author Comments
none
Rating
4.56 / 8
41 Votes
http://codebin.yi.org/927
page generated in 0.01 seconds