RC4+ stream cipher implement in PHP and Javascript

rc4 plus php

RC4+ is a modified version of RC4 with a more complex three-phase key schedule (taking about 3× as long as RC4, or the same as RC4-drop512), and a more complex output function which performs four additional lookups in the S array for each byte output, taking approximately 1.7× as long as basic RC4. We provide some function of RC4+ stream...

VMPC stream cipher implement in PHP and Javascript

vmpc php

VMPC (Variably Modified Permutation Composition) is a stream cipher similar to the well known and popular cipher RC4 designed by Ron Rivest. It was designed by Bartosz Zoltak, presented in 2004 at the Fast Software Encryption conference. VMPC is a modification of the RC4 cipher. We provide some function of VMPC stream cipher implement in PHP and Javascript PHP <?php /** * @author...

RC4A cipher implement in PHP and Javascript

rc4a php

RC4A is one of RC4 variants. Souradyuti Paul and Bart Preneel have proposed an RC4 variant, which they call RC4A. We provide some function implement of RC4A cipher in PHP and Javascript: PHP <?php /** * @author www.Tutorialspots.com * @copyright 2017 */ function rc4a($str, $key) { //Key-scheduling algorithm (KSA) for ($s = array(), $i = 0; $i < 256;...

RC4 implementation in PHP and Javascript

rc4 implementation in php

In cryptography, RC4 (Rivest Cipher 4 also known as ARC4 or ARCFOUR meaning Alleged RC4, see below) is a stream cipher. We provide some function RC4 in PHP and Javascript PHP: /** * @author www.Tutorialspots.com * @copyright 2012 */ /* Stream cipher CR4 */ function rc4($str, $key) { //Key-scheduling algorithm (KSA) for ($s = array(), $i = 0;...

PHP: how to convert ip address to binary string or hex string

hex2ip

With pure PHP, you can convert an IPv4 address to long with the function ip2long, but how to convert an Ipv6 address to long. You can't do this in the 32bits system. You only convert an ip address to binary string or hex string with some method we provide below: <?php /** * @author www.tutorialspots.com * @copyright 2016 **/ function ip2bin($ip)...

PHP function ord of unicode character

unicode ord

PHP have function ord to find ASCII value of character. But PHP don't support a function to find this value of unicode character. Now, we provider some method: <?php /** * @author www.Tutorialspots.com * @copyright 2015 */ function unicodeord($c) { $t = mb_convert_encoding($c, 'UCS-2LE', 'UTF-8'); return (ord($t{1}) << 8) + ord($t{0}); } function unicodeord2($c) { ...

PHP: Google translate token

<?php /* Copyright: www.tutorialspots.com */ //Unsigned right shift function uRShift($a, $b) { $z = hexdec(80000000); if ($z & $a) { $a = ($a >> 1); $a &= ( ~ $z); $a |= 0x40000000; ...

How to install Chilkat PHP on Linux

In this tutorial, i use PHP 5.4 and CentOS 32bits. Step 1: You can find other download at here For 32bits wget http://chilkatdownload.com/9.5.0.63/chilkat-9.5.0-php-5.4-x86-linux.tar.gz For 64bits wget http://chilkatdownload.com/9.5.0.63/chilkat-9.5.0-php-5.4-x86_64-linux.tar.gz Result: # wget http://chilkatdownload.com/9.5.0.63/chilkat-9.5.0-php- 5.4-x86-linux.tar.gz --2016-12-22 13:08:32-- http://chilkatdownload.com/9.5.0.63/chilkat-9.5.0-php-5 .4-x86-linux.tar.gz Resolving chilkatdownload.com... 52.216.224.242 Connecting to chilkatdownload.com|52.216.224.242|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 5103383 (4.9M) Saving to: `chilkat-9.5.0-php-5.4-x86-linux.tar.gz' 100% 5,103,383 13.9M/s in 0.3s 2016-12-22 13:08:33 (13.9 MB/s) - `chilkat-9.5.0-php-5.4-x86-linux.tar.gz' saved Step 2:...

How to fix error: Cannot load Zend Extension Manager – it was built with configuration 1.2.0

If you get the error like: Cannot load Zend Extension Manager - it was built with configuration 1.2.0, wher eas running engine is API220100525,NTS You can fix by follow theses steps: Step 1: Log into Kloxo controlpanel like http://111.111.111.111:7778 Step 2: goto PHP config Step 3: disable Zend Click Update. Done.

How to fix error: Failed loading /usr/lib/kloxophp/ioncube/ioncube_loader_lin_5.2.so

If you get the error like: Failed loading /usr/lib/kloxophp/ioncube/ioncube_loader_lin_5.2.so: /usr/lib/kl oxophp/ioncube/ioncube_loader_lin_5.2.so: undefined symbol: php_body_write Cannot load Zend Extension Manager - it was built with configuration 1.2.0, wher eas running engine is API220100525,NTS You can fix by follow theses steps: Step 1: Log into Kloxo controlpanel like http://111.111.111.111:7778 Step 2: goto PHP config Step 3: disable Ioncube Click Update. Done.