summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortailor <harningt@gmail.com>2008-02-02 06:53:07 +0000
committertailor <harningt@gmail.com>2008-02-02 06:53:07 +0000
commitb410be8526d0673be852787a482455e57268b0ed (patch)
tree4f0d5685948a4f1ef3bd1244115a4f848db4c766
parenteaad8555902fdbd659e3a9121f6cde8ccab42236 (diff)
downloadphp-openid-b410be8526d0673be852787a482455e57268b0ed.zip
php-openid-b410be8526d0673be852787a482455e57268b0ed.tar.gz
php-openid-b410be8526d0673be852787a482455e57268b0ed.tar.bz2
[project @ hmac-sha256-test]
-rw-r--r--Tests/Auth/OpenID/Association.php17
1 files changed, 17 insertions, 0 deletions
diff --git a/Tests/Auth/OpenID/Association.php b/Tests/Auth/OpenID/Association.php
index fcdda0d..61d3e71 100644
--- a/Tests/Auth/OpenID/Association.php
+++ b/Tests/Auth/OpenID/Association.php
@@ -33,6 +33,23 @@ class Tests_Auth_OpenID_Association extends PHPUnit_TestCase {
$this->assertTrue($assoc2->equal($assoc));
}
}
+ function test_me256()
+ {
+ if(!Auth_OpenID_HMACSHA256_SUPPORTED) return;
+ $issued = time();
+ $lifetime = 600;
+ $assoc = new Auth_OpenID_Association('handle', 'secret', $issued,
+ $lifetime, 'HMAC-SHA256');
+ $s = $assoc->serialize();
+ $assoc2 = Auth_OpenID_Association::deserialize(
+ 'Auth_OpenID_Association', $s);
+
+ if ($assoc2 === null) {
+ $this->fail('deserialize returned null');
+ } else {
+ $this->assertTrue($assoc2->equal($assoc));
+ }
+ }
}
?>