Advertisement
Guest User

Untitled

a guest
Jul 5th, 2018
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.15 KB | None | 0 0
  1. <?php
  2. /**
  3. *
  4. * @ This file is created by deZender.Net
  5. * @ deZender (PHP5 Decoder for Zend Encoder/SafeGuard & PhpExpress)
  6. *
  7. * @ Version : 1.1.6.0
  8. * @ Author : DeZender
  9. * @ Release on : 02.06.2013
  10. * @ Official site : http://DeZender.Net
  11. *
  12. */
  13.  
  14. class C_blowfish {
  15. public $B64 = './0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
  16. private static $instance = null;
  17.  
  18. static public function getInstance() {
  19. if (!isset( $instance )) {
  20. $c = 'C_blowfish';
  21. $instance = new $c( );
  22. }
  23.  
  24. return $instance;
  25. }
  26.  
  27. public function bytetoB64($ec) {
  28. $dc = '';
  29. $k = -1;
  30.  
  31. while ($k < strlen( $ec ) - 1) {
  32. $k++;
  33. $left = ord( $ec[$k] ) << 24;
  34. $k++;
  35. $left += ord( $ec[$k] ) << 16;
  36. $k++;
  37. $left += ord( $ec[$k] ) << 8;
  38. $k++;
  39. $left += ord( $ec[$k] );
  40. $k++;
  41. $right = ord( $ec[$k] ) << 24;
  42. $k++;
  43. $right += ord( $ec[$k] ) << 16;
  44. $k++;
  45. $right += ord( $ec[$k] ) << 8;
  46. $k++;
  47. $right += ord( $ec[$k] );
  48. for ($i = 0; $i < 6; $i++) {
  49. $dc .= $this->B64[$right & 63];
  50. $right = $right >> 6;
  51. }
  52.  
  53. for ($i = 0; $i < 6; $i++) {
  54. $dc .= $this->B64[$left & 63];
  55. $left = $left >> 6;
  56. }
  57. }
  58.  
  59. return $dc;
  60. }
  61.  
  62. public function B64tobyte($ec) {
  63. $dc = '';
  64. $k = -1;
  65.  
  66. while ($k < strlen( $ec ) - 1) {
  67. $right = 0;
  68. $left = 0;
  69. for ($i = 0; $i < 6; $i++) {
  70. $k++;
  71. $right |= @strpos( $this->B64, $ec[$k] ) << $i * 6;
  72. }
  73.  
  74. for ($i = 0; $i < 6; $i++) {
  75. $k++;
  76. $left |= @strpos( $this->B64, $ec[$k] ) << $i * 6;
  77. }
  78.  
  79. for ($i = 0; $i < 4; $i++) {
  80. $dc .= chr( ( $left & 255 << ( 3 - $i ) * 8 ) >> ( 3 - $i ) * 8 );
  81. }
  82.  
  83. for ($i = 0; $i < 4; $i++) {
  84. $dc .= chr( ( $right & 255 << ( 3 - $i ) * 8 ) >> ( 3 - $i ) * 8 );
  85. }
  86. }
  87.  
  88. return $dc;
  89. }
  90.  
  91. public function encrypt($text, $key) {
  92. $td = @mcrypt_module_open( MCRYPT_BLOWFISH, '', MCRYPT_MODE_ECB, '' );
  93. $iv = @mcrypt_create_iv( @mcrypt_enc_get_iv_size( $td ), MCRYPT_DEV_URANDOM );
  94. ...........................................................
  95. .........................
  96. ........
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement