Provide examples how to encode mail address with PHP, decrypt in python, using standard AES for use as local proxy for libravatar image requests

This commit is contained in:
Oliver Falk
2019-10-01 14:28:16 +02:00
parent f45d4cf05d
commit c864c2f115
6 changed files with 220 additions and 0 deletions

View File

@@ -0,0 +1,9 @@
#!/usr/bin/env python
from MyCypher import MyCypher
encstr = bytes('drEN/LqPBu1wJYHpN5eCjZXqVgvDEP3rZnXJt85Ma0k=', 'utf-8')
cypher = MyCypher(iv = str('asdf'))
print(cypher.decrypt(encstr))

View File

@@ -0,0 +1,8 @@
<?php
include 'lib/MyCypher.php';
$iv = 'asdf';
$key = 'Hallo123';
$cypher = new MyCypher($iv=$iv, $key=$key);
$php_encrypted = $cypher->encrypt('oliver@linux-kernel.at');
print($php_encrypted);