Skip to content

OO wrapper around mcrypt functions providing simple cryptography functionality

Notifications You must be signed in to change notification settings

glenscott/simple-crypt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

<?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";

About

OO wrapper around mcrypt functions providing simple cryptography functionality

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages