diff options
author | Michael Hamann <michael@content-space.de> | 2013-07-30 18:50:28 +0200 |
---|---|---|
committer | Michael Hamann <michael@content-space.de> | 2013-07-30 18:55:19 +0200 |
commit | 04369c3eae728e14962c41d1ab259f9e7ed99144 (patch) | |
tree | 215444b8ba53bcb3ba29b87d12e23a2affe81f33 /_test | |
parent | 30d544a4c371bf69023e4d9958bc2b00d84387d9 (diff) | |
download | rpg-04369c3eae728e14962c41d1ab259f9e7ed99144.tar.gz rpg-04369c3eae728e14962c41d1ab259f9e7ed99144.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)); + } +} |