2017 © Pedro Peláez
 

library xor-encryption

php xor-encryption

image

opqnext/xor-encryption

php xor-encryption

  • Friday, August 18, 2017
  • by opqnext
  • Repository
  • 1 Watchers
  • 3 Stars
  • 32 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

XorEncryption(异或加密)

XorEncryption(异或加密), (*1)

  • 使用方法(1)

使用默认 key [opqnext] 进行加密解密。, (*2)

require 'vendor/autoload.php';

// 实例化类
$xor = new XorEncryption\XorEncryption();

// 要加密的字符串
$str = "opqnext";

// XOR加密
$secret = $xor->encode($str);
echo $secret."\n";

// XOR解密
$str = $xor->decode($secret);
echo $str."\n";
  • 使用方法(2)

使用自定义 key 进行加密解密。, (*3)

require 'vendor/autoload.php';

$key = "2fc2b4aaa8d087af4d6dc085f3316c0a";

// 实例化类
$xor = new XorEncryption\XorEncryption($key);

// 要加密的字符串
$str = "opqnext";

// XOR加密
$secret = $xor->encode($str);
echo $secret."\n";

// XOR解密
$str = $xor->decode($secret);
echo $str."\n";

The Versions

18/08 2017

dev-master

9999999-dev

php xor-encryption

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

by Avatar opqnext

php xor

18/08 2017

v1.0.1

1.0.1.0

php xor-encryption

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

by Avatar opqnext

php xor