Framework:sb Encryption ForTransmission

From Surebert wiki

Overview

Can be used to security encode information to be sent across network. It is currently using MCRYPT_RIJNDAEL_256 encryption. It is used with JSON_RPC2 servers and clients when encrypted communication is required.

Encrypting Data

php code

$m = new sb_Encryption_ForTransmission("Very secret preshared key");
$encrypted = $m->encrypt("Here is some stuff to encrypt");

Unencrypting Data

php code

$m = new sb_Encryption_ForTransmission("Very secret preshared key");
$decrypted = $m->decrypt($encrypted);