From 013ee5e08d3fca5db9a720a2d7d51ea85803dc19 Mon Sep 17 00:00:00 2001 From: Enrico Zimuel Date: Mon, 30 Jul 2012 17:13:37 +0200 Subject: [PATCH 1/2] Fixed a typo in a comment --- src/PublicKey/Rsa.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PublicKey/Rsa.php b/src/PublicKey/Rsa.php index 26ea280..7e1f00d 100644 --- a/src/PublicKey/Rsa.php +++ b/src/PublicKey/Rsa.php @@ -251,7 +251,7 @@ public function decrypt($data, Rsa\AbstractKey $key = null) throw new Exception\InvalidArgumentException('No key specified for the decryption'); } - // check if date is encoded in Base64 + // check if data is encoded in Base64 $output = base64_decode($data, true); if (false !== $output) { $data = $output; From 9cff8b8eb9c35885bbc5d51f63aeb2a92575f20e Mon Sep 17 00:00:00 2001 From: Matthew Weier O'Phinney Date: Mon, 30 Jul 2012 12:02:59 -0500 Subject: [PATCH 2/2] [zendframework/zf2#2042] Fix CS - trailing whitespace --- src/PublicKey/Rsa.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/PublicKey/Rsa.php b/src/PublicKey/Rsa.php index 7e1f00d..6767710 100644 --- a/src/PublicKey/Rsa.php +++ b/src/PublicKey/Rsa.php @@ -184,13 +184,13 @@ public function verify($data, $signature, Rsa\PublicKey $publicKey = null) if (null === $publicKey) { $publicKey = $this->options->getPublicKey(); } - + // check if signature is encoded in Base64 $output = base64_decode($signature, true); if (false !== $output) { $signature = $output; - } - + } + $result = openssl_verify( $data, $signature, @@ -255,8 +255,8 @@ public function decrypt($data, Rsa\AbstractKey $key = null) $output = base64_decode($data, true); if (false !== $output) { $data = $output; - } - + } + return $key->decrypt($data); }