Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
OO wrapper around mcrypt functions providing simple cryptography functionality
PHP
Branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
README
SimpleCrypt.php
SimpleCryptTest.php
example.php

README

<?php

require_once 'SimpleCrypt.php';

// show the algorithms available for use
print_r( SimpleCrypt::get_available_algorithms() );

// encrypt a string using Triple DES (CBC mode)
$crypt = new SimpleCrypt( 'tripledes', 'mysecretkey' );
$encrypted_data = $crypt->encrypt_data( 'stringtoencrypt' );
echo "Encrypted data: " . bin2hex( $encrypted_data ) . "\n";
echo "Decrypted data: " . $crypt->decrypt_data( $encrypted_data ) . "\n";
Something went wrong with that request. Please try again.