mirror of
https://git.linux-kernel.at/oliver/ivatar.git
synced 2025-11-14 20:18:02 +00:00
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:
9
encrypted_proxy/test_code/decrypt.py
Normal file
9
encrypted_proxy/test_code/decrypt.py
Normal 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))
|
||||
|
||||
8
encrypted_proxy/test_code/encrypt.php
Normal file
8
encrypted_proxy/test_code/encrypt.php
Normal 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);
|
||||
Reference in New Issue
Block a user