diff options
author | Michael Hamann <michael@content-space.de> | 2013-07-30 18:50:28 +0200 |
---|---|---|
committer | Christopher Smith <chris@jalakai.co.uk> | 2013-08-01 11:11:52 +0200 |
commit | 865faf755070832ca9c794e1f1c190ddda7e0850 (patch) | |
tree | 850fd29bc1b64d62ab21c9ffff97cbb8b9d0405d /_test | |
parent | ae27e120734c91b8f006928ec4e2f89e5b79393d (diff) | |
download | rpg-865faf755070832ca9c794e1f1c190ddda7e0850.tar.gz rpg-865faf755070832ca9c794e1f1c190ddda7e0850.tar.bz2 |
Add AES from phpseclib and use it for cookie encryption
This replaces the deprecated and broken Blowfish implementation that has
previously been used and should provide a lot more security.
Diffstat (limited to '_test')
-rw-r--r-- | _test/tests/inc/auth_encryption.test.php | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/_test/tests/inc/auth_encryption.test.php b/_test/tests/inc/auth_encryption.test.php new file mode 100644 index 000000000..041eba00e --- /dev/null +++ b/_test/tests/inc/auth_encryption.test.php @@ -0,0 +1,12 @@ +<?php + +/** + * Tests the auth_decrypt and auth_encrypt-functions + */ +class auth_encryption_test extends DokuWikiTest { + function testDeEncrypt() { + $data = "OnA28asdfäakgß*+!\"+*"; + $secret = "oeaf1öasdöflk§"; + $this->assertEquals($data, auth_decrypt(auth_encrypt($data, $secret), $secret)); + } +} |