PHP Classes

File: example.php

Recommend this page to a friend!
  Classes of ben bi   Serial Number Scrambler   example.php   Download  
File: example.php
Role: Example script
Content type: text/plain
Description: example
Class: Serial Number Scrambler
Encrypt and decrypt serial numbers
Author: By
Last change:
Date: 10 years ago
Size: 469 bytes
 

Contents

Class file image Download
<?php
include 'SerialNumberScrambler.php';

$crypt = new SerialNumberScrambler();

$seed = '52dC9C3DB8F11';
$code1 = 'AG00000000000010';

print
"Original: " . $code1 . "<br/>\n";

$encrypt_result = $crypt->encrypt($seed, $code1);

print
"Encrypted: " . $encrypt_result . "<br/>\n";

// DECRYPT
$decrypt_result = $crypt->decrypt($seed, $encrypt_result);

print
"Decrypted: " . $decrypt_result . "<br/>\n";
echo
"<br/>\n";
print_r($crypt->errors);
?>