<?php // demo/steganography_elephant.php
/**
* Color-Sensitive Image Steganography
*/
error_reporting(E_ALL);
// ORIGINAL AND SOON-TO-BE-REVEALED IMAGE URLS
$url = 'images/steganography_elephant.png';
$new = 'images/revealed_text_elephant.png';
// ACQUIRE THE ORIGINAL IMAGE WITH THE SECRET MESSAGE
$img = ImageCreateFromPNG($url);
// LOCATE THE COLOR OF THE SIGNAL PIXEL
$rgb = ImageColorAt($img, 0, 0);
// ALLOCATE BRIGHT YELLOW REPLACEMENT COLOR IDENTIFIER
$cid = ImageColorAllocate($img, 0xFF, 0xFF, 0x00);
// GET PIXEL COUNTS FOR WIDTH AND HEIGHT OF IMAGE
$wide = ImagesX($img);
$high = ImagesY($img);
// PIXEL POINTERS SKIP THE SIGNAL PIXEL
$nw = $nh = 1;
// ITERATE OVER ALL OF THE PIXELS
while ($nw < $wide)
{
while ($nh < $high)
{
$pxl = ImageColorAt($img, $nw, $nh);
// REPLACE THE SIGNAL PIXELS WITH THE REPLACEMENT COLOR
if ($pxl == $rgb)
{
ImageSetPixel($img, $nw, $nh, $cid);
}
$nh++;
}
$nh = 0;
$nw++;
}
// WRITE THE NEW IMAGE FILE
ImagePNG($img, $new);
ImageDestroy($img);
// SHOW THE TWO IMAGES
$original = '<img style="padding:4px" src="' . $url . '" />';
$revealed = '<img style="padding:4px" src="' . $new . '" />';
echo $original, $revealed;
<?php // demo/rot13.php
/**
* Scramble Letters
*
* http://php.net/manual/en/function.str-rot13.php
* https://en.wikipedia.org/wiki/The_quick_brown_fox_jumps_over_the_lazy_dog
*/
error_reporting(E_ALL);
echo '<pre>';
// TEST DATA
$str = "The quick brown fox jumps over the lazy dog.";
// ENCODE ONCE
$rot = str_rot13($str);
// ENCODE AGAIN TO DECODE
$new = str_rot13($rot);
// SHOW THE WORK PRODUCT
echo PHP_EOL . $str;
echo PHP_EOL . $rot;
echo PHP_EOL . $new;
Outputs:
The quick brown fox jumps over the lazy dog.
Gur dhvpx oebja sbk whzcf bire gur ynml qbt.
The quick brown fox jumps over the lazy dog.
<?php // demo/md5.php
/**
* Compute message digest
*
* http://php.net/manual/en/function.md5.php
* http://www.faqs.org/rfcs/rfc1321.html
*/
error_reporting(E_ALL);
echo '<pre>';
// TEST DATA
$str = "The quick brown fox jumps over the lazy dog.";
// MAKE A HASH
$md5 = md5($str);
// SHOW THE WORK PRODUCT
echo PHP_EOL . $str;
echo PHP_EOL . $md5;
Outputs:
The quick brown fox jumps over the lazy dog.
e4d909c290d0fb1ca068ffaddf22cbd0
<?php // demo/md5.php
/**
* Compare message digest
*
* http://php.net/manual/en/function.md5.php
* http://www.faqs.org/rfcs/rfc1321.html
*/
error_reporting(E_ALL);
echo '<pre>';
// TEST DATA
$str = "The quick brown fox jumps over the lazy dog.";
// MAKE A HASH
$md5 = md5($str);
// TEST THE MESSAGE
if (!empty($_POST))
{
// TEST FOR DAMAGED FIELDS
if ( ($str != $_POST['str']) || ($md5 != $_POST['md5']) )
{
echo "Message is damaged";
}
else echo "Message is intact";
}
// MAKE A FORM
$form = <<<EOF
<form method="post">
<input name="str" value="$str" size="48" />
<input name="md5" value="$md5" size="32" type="hidden" readonly />
<input type="submit" />
</form>
EOF;
echo $form;
<?php // demo/cookie_safety.php
/**
* Demonstrate how to encode information in a cookie in a way that
* can reduce the risk of cookie tampering. We do this with a
* salted message digest that contains the contents of the cookie.
*
* When the cookie is returned, we use the value to recreate the
* salted message digest. If the new message digest does not match
* the message digest in the cookie, we can discard the cookie.
*
* The cookie will be url-encoded on the browser like this:
* MARY+HAD+A+LITTLE+LAMB%7Ccf783c37f18d007d23483b11759ec181
* It will be url-decoded before it is presented to php.
*
* http://php.net/manual/en/function.setcookie.php
* http://php.net/manual/en/function.md5.php
*/
error_reporting(E_ALL);
ob_start();
echo '<pre>';
// A DATA DELIMITER
$dlm = '|';
// YOUR OWN SECRET CODE IS A SALT FOR THE MESSAGE DIGEST STRING
$secret_code = 'MY SECRET';
// A DATA STRING THAT WE WANT TO STORE (MIGHT BE A DB KEY)
$cookie_value = 'MARY HAD A LITTLE LAMB';
// MAKE A MESSAGE DIGEST FROM THE DATA STRING TOGETHER WITH OUR SECRET CODE
$cookie_code = md5($cookie_value . $secret_code);
// CONSTRUCT THE COOKIE STRING WITH THE CLEAR TEXT AND THE CODED STRING
$safe_cookie_value = $cookie_value . $dlm . $cookie_code;
// SET THE COOKIE LIKE "MARY HAD A LITTLE LAMB|cf783c37f18d007d23483b11759ec181"
setcookie
( 'safe_cookie' // COOKIE NAME
, $safe_cookie_value // COOKIE VALUE
, NULL // COOKIE EXPIRATION
, NULL // COOKIE PATH
, NULL // COOKIE DOMAIN/SUBDOMAIN http://php.net/manual/en/function.setcookie.php#76395
, NULL // COOKIE SECURE (HTTPS)
, NULL // COOKIE HTTP-ONLY
)
;
// HOW TO TEST THE COOKIE
if (isset($_COOKIE["safe_cookie"]))
{
// BREAK THE COOKIE VALUE APART AT THE DELIMITER
$array = explode($dlm, $_COOKIE["safe_cookie"]);
// ENCODE THE DATA STRING TOGETHER WITH YOUR SECRET
$cookie_test = md5($array[0] . $secret_code);
// IF THE MD5 CODES DO NOT MATCH, THE COOKIE IS NO LONGER INTACT
if ($cookie_test == $array[1])
{
echo PHP_EOL . "THE COOKIE {$_COOKIE["safe_cookie"]} IS INTACT";
}
else
{
echo PHP_EOL . "THE COOKIE {$_COOKIE["safe_cookie"]} IS <i>CORRUPT</i>";
}
}
else
{
die('COOKIE IS SET - REFRESH THE BROWSER WINDOW NOW');
}
// SHOW WHAT HAPPENS WITH A CORRUPT COOKIE
$_COOKIE["safe_cookie"] = str_replace('MARY', 'FRED', $_COOKIE["safe_cookie"]);
// TEST THE COOKIE AGAIN
if (isset($_COOKIE["safe_cookie"]))
{
// BREAK THE COOKIE VALUE APART AT THE DELIMITER
$array = explode($dlm, $_COOKIE["safe_cookie"]);
// ENCODE THE DATA STRING TOGETHER WITH OUT SECRET
$cookie_test = md5($array[0] . $secret_code);
// IF THE MD5 CODES DO NOT MATCH, THE COOKIE IS NO LONGER INTACT
if ($cookie_test == $array[1])
{
echo PHP_EOL . "THE COOKIE {$_COOKIE["safe_cookie"]} IS INTACT";
}
else
{
echo PHP_EOL . "THE COOKIE {$_COOKIE["safe_cookie"]} IS <i>CORRUPT</i>";
}
}
<?php // demo/hash_algos.php
/**
* Demonstrate PHP hashing algorithms
*
* http://php.net/manual/en/book.hash.php
* http://php.net/manual/en/function.hash.php
*/
error_reporting(E_ALL);
echo '<pre>';
// IF THE FORM HAS BEEN SUBMITTED, HASH THE REQUEST VARIABLE
if (!empty($_GET['q']))
{
$qget = substr($_GET['q'], 0, 10);
$qpad = str_pad($qget, 10, ' ', STR_PAD_RIGHT);
$algos = hash_algos();
echo PHP_EOL . ' 1...5...10...15...20...25...30...35...40...45...50...55...60...65...70...75...80...85...90...95..100..105..110..115..120..125..130';
echo PHP_EOL . ' | | | | | | | | | | | | | |';
foreach ($algos as $algo)
{
$hash = hash($algo, $qget);
$algo_p = str_pad($algo . ':' , 12, ' ', STR_PAD_RIGHT);
echo PHP_EOL . $qpad . " hashed with $algo_p " . $hash;
}
}
// PUT UP THE FORM TO RECEIVE THE INPUT STRING
$form = <<<EOF
<form>
String to hash (up to 10 characters): <input name="q" autocomplete="off" />
<input type="submit" />
</form>
EOF;
echo $form;
<?php
/**
* The Interface defines the two main data transformation activities
*/
Interface Encryption_Interface
{
public function encrypt($text, $key);
public function decrypt($text, $key);
}
<?php // demo/encrypt_decrypt_mcrypt.php
/**
* Show how to encrypt and decrypt information
* with binary-safe transport over the internet
* Note: ECB may not be the "best" mode, YMMV
*
* http://php.net/manual/en/book.mcrypt.php
* http://php.net/manual/en/ref.mcrypt.php
* http://php.net/manual/en/mcrypt.ciphers.php
*
* https://en.wikipedia.org/wiki/Advanced_Encryption_Standard
* https://en.wikipedia.org/wiki/Base64
*
* Parallel construction in the encrypt() decrypt() methods
*/
error_reporting(E_ALL);
/**
* The Interface defines the two main data transformation activities
*/
Interface Encryption_Interface
{
public function encrypt($text, $key);
public function decrypt($text, $key);
}
class Mcrypt Implements Encryption_Interface
{
protected $cipher;
protected $mode;
public function __construct($cipher = MCRYPT_RIJNDAEL_256, $mode = MCRYPT_MODE_ECB)
{
$this->cipher = $cipher;
$this->mode = $mode;
}
public function encrypt($text, $key)
{
$data = mcrypt_encrypt($this->cipher, $key, $text, $this->mode);
return base64_encode($data);
}
public function decrypt($text, $key)
{
$text = base64_decode($text);
$data = mcrypt_decrypt($this->cipher, $key, $text, $this->mode);
return $data;
}
}
// INSTANTIATE AN ENCRYPTION OBJECT FROM THE CLASS
$m = new Mcrypt;
// INITIALIZE VARS FOR LATER USE IN THE HTML FORM
$encoded = $decoded = NULL;
$secret = !empty($_POST['secret']) ? $_POST['secret'] : '';
// IF ANYTHING WAS POSTED SHOW THE DATA
if (!empty($_POST["clearstring"]))
{
$encoded = $m->encrypt($_POST["clearstring"], $secret);
echo "<br/>{$_POST["clearstring"]} YIELDS ENCODED ";
var_dump($encoded);
}
if (!empty($_POST["cryptstring"]))
{
$decoded = $m->decrypt($_POST["cryptstring"], $secret);
echo "<br/>{$_POST["cryptstring"]} YIELDS DECODED ";
var_dump($decoded);
}
// CREATE THE FORM USING HEREDOC NOTATION
$form = <<<FORM
<form method="post">
Secret Key:<input name="secret" value="$secret" autocomplete="off" />
<br>
<textarea name="clearstring">$decoded</textarea>
<input type="submit" value="ENCRYPT" />
<br>
<textarea name="cryptstring">$encoded</textarea>
<input type="submit" value="DECRYPT" />
</form>
FORM;
echo $form;
<?php // demo/encrypt_decrypt_mcrypt_iv.php
/**
* Show how to encrypt and decrypt information
* with binary-safe transport over the internet
* Note: ECB may not be the "best" mode, YMMV
*
* http://php.net/manual/en/book.mcrypt.php
* http://php.net/manual/en/ref.mcrypt.php
* http://php.net/manual/en/mcrypt.ciphers.php
*
* https://en.wikipedia.org/wiki/Advanced_Encryption_Standard
* https://en.wikipedia.org/wiki/Base64
*
* Parallel construction in the encrypt() decrypt() methods
*/
error_reporting(E_ALL);
/**
* The Interface defines the two main data transformation activities
*/
Interface Encryption_Interface
{
public function encrypt($text, $key);
public function decrypt($text, $key);
}
class Mcrypt Implements Encryption_Interface
{
protected $cipher;
protected $mode;
protected $ivsize;
protected $vector;
public function __construct($cipher = MCRYPT_RIJNDAEL_256, $mode = MCRYPT_MODE_ECB)
{
$this->cipher = $cipher;
$this->mode = $mode;
$this->ivsize = mcrypt_get_iv_size($cipher, $mode);
var_dump($this->ivsize);
$this->vector = mcrypt_create_iv($this->ivsize, MCRYPT_RAND);
}
public function encrypt($text, $key)
{
$data = mcrypt_encrypt($this->cipher, $key, $text, $this->mode, $this->vector);
return base64_encode($this->vector . $data);
}
public function decrypt($text, $key)
{
$text = base64_decode($text);
// SEPARATE THE IV AND THE ENCRYPTED DATA
$vect = substr($text, 0, $this->ivsize);
$text = substr($text, $this->ivsize);
$data = mcrypt_decrypt($this->cipher, $key, $text, $this->mode, $this->vector);
return $data;
}
}
// INSTANTIATE AN ENCRYPTION OBJECT FROM THE CLASS
$m = new Mcrypt;
// INITIALIZE VARS FOR LATER USE IN THE HTML FORM
$encoded = $decoded = NULL;
$secret = !empty($_POST['secret']) ? $_POST['secret'] : '';
// IF ANYTHING WAS POSTED SHOW THE DATA
if (!empty($_POST["clearstring"]))
{
$encoded = $m->encrypt($_POST["clearstring"], $secret);
echo "<br/>{$_POST["clearstring"]} YIELDS ENCODED ";
var_dump($encoded);
}
if (!empty($_POST["cryptstring"]))
{
$decoded = $m->decrypt($_POST["cryptstring"], $secret);
echo "<br/>{$_POST["cryptstring"]} YIELDS DECODED ";
var_dump($decoded);
}
// CREATE THE FORM USING HEREDOC NOTATION
$form = <<<FORM
<form method="post">
Secret Key:<input name="secret" value="$secret" autocomplete="off" />
<br>
<textarea name="clearstring">$decoded</textarea>
<input type="submit" value="ENCRYPT" />
<br>
<textarea name="cryptstring">$encoded</textarea>
<input type="submit" value="DECRYPT" />
</form>
FORM;
echo $form;
1...5...10...15...20...25...30...35...40...45...50...55...60...65...70...75...80...85...
| |
| Initialization Vector | Encrypted Data
| 32 bytes in this example | followed by encrypted padding
| |
199zZRmtQ2LYxDAc1NOOVwuH/upttDL6wCH7XHsB2HL3GnSAeKr4aEbJdD7X9jhe5HREgT9An1lKtmoEszLPLQ==
ZJ6eXQbXWipyod5vCXGPXcC0gMWzbud6vSeVIKmR0Qb3GnSAeKr4aEbJdD7X9jhe5HREgT9An1lKtmoEszLPLQ==
lSAukpbvItlgzp6TxHSsbZH18EZIRgBdgKYIGI4TjAL3GnSAeKr4aEbJdD7X9jhe5HREgT9An1lKtmoEszLPLQ==
<?php // demo/encrypt_decrypt_openssl.php
/**
* Show how to encrypt and decrypt information using OpenSSL
* with binary-safe (base64) transport over the internet
*
* http://php.net/manual/en/book.openssl.php
*
* https://en.wikipedia.org/wiki/Advanced_Encryption_Standard
* https://en.wikipedia.org/wiki/Base64
*
* https://bugs.php.net/bug.php?id=67304
*
* Parallel construction in the encrypt() decrypt() methods
*/
error_reporting(E_ALL);
/**
* The Interface defines the two main data transformation activities
*/
Interface Encryption_Interface
{
public function encrypt($text, $key);
public function decrypt($text, $key);
}
class SSLCrypt Implements Encryption_Interface
{
protected $cipher_algorithm;
protected $digest_method;
protected $ivector_length;
public function __construct($cipher_algorithm = 'aes-256-ctr', $digest_method = 'sha256')
{
$this->cipher_algorithm = $cipher_algorithm;
$this->digest_method = $digest_method;
if (!in_array($cipher_algorithm, openssl_get_cipher_methods(TRUE))) {
throw new \Exception(__METHOD__ . " Unknown cipher $cipher_algorithm");
}
if (!in_array($digest_method, openssl_get_md_methods(TRUE))) {
throw new \Exception(__METHOD__ . " Unknown digest $digest_method");
}
$this->ivector_length = openssl_cipher_iv_length($cipher_algorithm);
}
public function encrypt($text, $key)
{
$keyhash = openssl_digest($key, $this->digest_method, TRUE);
$ivector = mcrypt_create_iv($this->ivector_length, MCRYPT_DEV_URANDOM);
$crypted = openssl_encrypt($text, $this->cipher_algorithm, $keyhash, OPENSSL_RAW_DATA, $ivector);
if ($crypted === FALSE) {
throw new \Exception(__METHOD__ . ' Failed: ' . openssl_error_string());
}
// RETURN THE IV AND THE ENCRYPTED DATA
return base64_encode($ivector . $crypted);
}
public function decrypt($text, $key)
{
$keyhash = openssl_digest($key, $this->digest_method, TRUE);
$rawdata = base64_decode($text);
if (strlen($rawdata) < $this->ivector_length) {
throw new \Exception(__METHOD__ . ' Data is too short');
}
// SEPARATE THE IV AND THE ENCRYPTED DATA
$ivector = substr($rawdata, 0, $this->ivector_length);
$rawtext = substr($rawdata, $this->ivector_length);
$decrypt = openssl_decrypt($rawtext, $this->cipher_algorithm, $keyhash, OPENSSL_RAW_DATA, $ivector);
if ($decrypt === FALSE) {
throw new \Exception(__METHOD__ . ' Failed: ' . openssl_error_string());
}
return $decrypt;
}
}
// INSTANTIATE ENCRYPTION OBJECTS FROM THE CLASS
$s = new SSLCrypt;
// INITIALIZE VARS FOR LATER USE IN THE HTML FORM
$s_encoded = $s_decoded = NULL;
$s_secret = !empty($_POST['s_secret']) ? $_POST['s_secret'] : NULL;
// IF ANYTHING WAS POSTED SHOW THE DATA
if (!empty($_POST))
{
if (!empty($_POST["s_clearstring"]))
{
$s_encoded = $s->encrypt($_POST["s_clearstring"], $_POST["s_secret"]);
echo "<br/>{$_POST["s_clearstring"]} YIELDS OpenSSL ENCODED ";
var_dump($s_encoded);
}
if (!empty($_POST["s_cryptstring"]))
{
$s_decoded = $s->decrypt($_POST["s_cryptstring"], $_POST["s_secret"]);
echo "<br/>{$_POST["s_cryptstring"]} YIELDS OpenSSL DECODED ";
var_dump($s_decoded);
}
}
// CREATE THE FORM USING HEREDOC NOTATION
$form = <<<FORM
<form method="post">
<h3>Using OpenSSL</h3>
<input type="hidden" name="choice" value="ssl" />
Secret Password (Key):
<br>
<input name="s_secret" value="$s_secret" autocomplete="off" />
<br>
<textarea name="s_clearstring">$s_decoded</textarea>
<input type="submit" value="ENCRYPT OpenSSL" />
<br>
<textarea name="s_cryptstring">$s_encoded</textarea>
<input type="submit" value="DECRYPT OpenSSL" />
<br>
</form>
FORM;
echo $form;
1...5...10...15...20...25...30..
| |
| Initial'n | Encrypted
| Vector | Data
| 16 bytes |
| |
0RmMD1ev5MVBXxKj2Dcfs8ciSXgDPgyx
j+odB29EPsb3i9TasNHXL28jiHN5zBSq
+2aiANr9CA5TJL2Y82zmIK/i0N+cFV3h
<?php // demo/encrypt_decrypt_openssl_auth.php
/**
* Show how to encrypt and decrypt information
* with Encrypt-then-Authenticate design
* with binary-safe (base64) transport over the internet
*
* http://php.net/manual/en/book.openssl.php
*
* https://en.wikipedia.org/wiki/Advanced_Encryption_Standard
* https://en.wikipedia.org/wiki/Base64
* https://en.wikipedia.org/wiki/Authenticated_encryption
*
* https://bugs.php.net/bug.php?id=67304
*
* Parallel construction in the encrypt() decrypt() methods
*/
error_reporting(E_ALL);
/**
* The Interface defines the two main data transformation activities
*/
Interface Encryption_Interface
{
public function encrypt($text, $key);
public function decrypt($text, $key);
}
class SSLCrypt Implements Encryption_Interface
{
protected $cipher_algorithm;
protected $digest_method;
protected $vector_length;
public function __construct($cipher_algorithm = 'aes-256-ctr', $digest_method = 'sha256')
{
$this->cipher_algorithm = $cipher_algorithm;
$this->digest_method = $digest_method;
if (!in_array($cipher_algorithm, openssl_get_cipher_methods(TRUE))) {
throw new \Exception(__METHOD__ . " Unknown cipher $cipher_algorithm");
}
if (!in_array($digest_method, openssl_get_md_methods(TRUE))) {
throw new \Exception(__METHOD__ . " Unknown digest $digest_method");
}
$this->ivector_length = openssl_cipher_iv_length($cipher_algorithm);
}
public function encrypt($text, $key)
{
$keyhash = openssl_digest($key, $this->digest_method, TRUE);
$ivector = mcrypt_create_iv($this->ivector_length, MCRYPT_DEV_URANDOM);
$crypted = openssl_encrypt($text, $this->cipher_algorithm, $keyhash, OPENSSL_RAW_DATA, $ivector);
if ($crypted === FALSE) {
throw new \Exception(__METHOD__ . ' Failed: ' . openssl_error_string());
}
// RETURN THE AUTH DIGEST, IV, AND THE ENCRYPTED DATA
$payload = base64_encode($ivector . $crypted);
var_dump($payload);
$digest = openssl_digest($key . $payload, $this->digest_method);
var_dump($digest);
return $digest . '|' . $payload;
}
public function decrypt($text, $key)
{
$keyhash = openssl_digest($key, $this->digest_method, TRUE);
// SEPARATE AND TEST THE AUTH DIGEST
$inputs = explode('|', $text);
$digest = $inputs[0];
$compare = openssl_digest($key . $inputs[1], $this->digest_method);
if ($compare != $digest){
throw new \Exception(__METHOD__ . ' Authentication digest failure');
}
$rawdata = base64_decode($inputs[1]);
// SEPARATE THE IV AND THE ENCRYPTED DATA
$ivector = substr($rawdata, 0, $this->ivector_length);
$rawtext = substr($rawdata, $this->ivector_length);
$decrypt = openssl_decrypt($rawtext, $this->cipher_algorithm, $keyhash, OPENSSL_RAW_DATA, $ivector);
if ($decrypt === FALSE) {
throw new \Exception(__METHOD__ . ' Failed: ' . openssl_error_string());
}
return $decrypt;
}
}
// INSTANTIATE ENCRYPTION OBJECTS FROM THE CLASS
$s = new SSLCrypt;
// INITIALIZE VARS FOR LATER USE IN THE HTML FORM
$s_encoded = $s_decoded = NULL;
$s_secret = !empty($_POST['s_secret']) ? $_POST['s_secret'] : NULL;
// IF ANYTHING WAS POSTED SHOW THE DATA
if (!empty($_POST))
{
if (!empty($_POST["s_clearstring"]))
{
$s_encoded = $s->encrypt($_POST["s_clearstring"], $_POST["s_secret"]);
echo "<br/>{$_POST["s_clearstring"]} YIELDS OpenSSL ENCODED ";
var_dump($s_encoded);
}
if (!empty($_POST["s_cryptstring"]))
{
$s_decoded = $s->decrypt($_POST["s_cryptstring"], $_POST["s_secret"]);
echo "<br/>{$_POST["s_cryptstring"]} YIELDS OpenSSL DECODED ";
var_dump($s_decoded);
}
}
// CREATE THE FORM USING HEREDOC NOTATION
$form = <<<FORM
<form method="post">
<h3>Using OpenSSL and MAC</h3>
Secret Password (Key):
<br>
<input name="s_secret" value="$s_secret" autocomplete="off" />
<br>
<textarea name="s_clearstring">$s_decoded</textarea>
<input type="submit" value="ENCRYPT OpenSSL" />
<br>
<textarea name="s_cryptstring">$s_encoded</textarea>
<input type="submit" value="DECRYPT OpenSSL" />
<br>
</form>
FORM;
echo $form;
1...5...10...15...20...25...30...35...40...45...50...55...60...65...70...75...80...85...90...95..
| |
| Message Authentication Code | Payload
| Digest of Key and Data | |
| | Initial'n | Encrypted
| | Vector | Data
| | |
16565deb7c4b4c6c13aa42c9653c434b0c5a6247977d5d71dc40b890f125e7c3|egl00WlazSOcDsxDV5iBhMnXpjY74aCF
cddf5078c7ddef45666b45e0a7ee0f16e936ebf8a43cc2d327e99e26740cb0ae|uQOtWB7hhq8Ob1WEbVgEaJAr23aU52bN
aca329b53db224c44d640b75ecfd237c00e6c827945273b5f6ea22f6e14c1d5c|DRFAtnQqIxnnYyMvI4kd5Qb0yvu1TXSO
|
| Pipe Delimiter
Have a question about something in this article? You can receive help directly from the article author. Sign up for a free trial to get started.
Comments (1)
Commented: