From 4fa257c5b155e169fbfc5ad0e900000f8564d7ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lu=C3=ADs=20Cobucci?= Date: Sun, 11 Nov 2018 12:47:24 +0100 Subject: [PATCH 1/3] Fix wrong documentation block --- src/Signer/BaseSigner.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Signer/BaseSigner.php b/src/Signer/BaseSigner.php index b5243ff9..e03d6ec1 100644 --- a/src/Signer/BaseSigner.php +++ b/src/Signer/BaseSigner.php @@ -67,7 +67,7 @@ private function getKey($key) abstract public function createHash($payload, Key $key); /** - * Creates a hash with the given data + * Performs the signature verification * * @param string $expected * @param string $payload From a68e48509b07c24190fc5ddbeac7d816aa045cdd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lu=C3=ADs=20Cobucci?= Date: Sun, 11 Nov 2018 12:47:50 +0100 Subject: [PATCH 2/3] Fix typo in doc block --- src/Signer/Ecdsa.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Signer/Ecdsa.php b/src/Signer/Ecdsa.php index 56f66fd4..ea727489 100644 --- a/src/Signer/Ecdsa.php +++ b/src/Signer/Ecdsa.php @@ -134,7 +134,7 @@ private function extractSignature($value) } /** - * Returns the lenght of signature parts + * Returns the length of signature parts * * @return int */ From 3d72c120d9ca09c3fd9856093b1250c12fc67f3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lu=C3=ADs=20Cobucci?= Date: Sun, 11 Nov 2018 12:48:18 +0100 Subject: [PATCH 3/3] Document internal methods and classes These were always considered as internal components, however that was never properly documented. --- src/Signer/BaseSigner.php | 4 ++++ src/Signer/Ecdsa.php | 4 ++++ src/Signer/Ecdsa/KeyParser.php | 2 ++ src/Signer/Hmac.php | 4 ++++ src/Signer/Rsa.php | 2 ++ 5 files changed, 16 insertions(+) diff --git a/src/Signer/BaseSigner.php b/src/Signer/BaseSigner.php index e03d6ec1..c65076fd 100644 --- a/src/Signer/BaseSigner.php +++ b/src/Signer/BaseSigner.php @@ -59,6 +59,8 @@ private function getKey($key) /** * Creates a hash with the given data * + * @internal + * * @param string $payload * @param Key $key * @@ -69,6 +71,8 @@ abstract public function createHash($payload, Key $key); /** * Performs the signature verification * + * @internal + * * @param string $expected * @param string $payload * @param Key $key diff --git a/src/Signer/Ecdsa.php b/src/Signer/Ecdsa.php index ea727489..e1d52532 100644 --- a/src/Signer/Ecdsa.php +++ b/src/Signer/Ecdsa.php @@ -136,6 +136,8 @@ private function extractSignature($value) /** * Returns the length of signature parts * + * @internal + * * @return int */ abstract public function getSignatureLength(); @@ -143,6 +145,8 @@ abstract public function getSignatureLength(); /** * Returns the name of algorithm to be used to create the signing hash * + * @internal + * * @return string */ abstract public function getAlgorithm(); diff --git a/src/Signer/Ecdsa/KeyParser.php b/src/Signer/Ecdsa/KeyParser.php index f18952df..7d7c1976 100644 --- a/src/Signer/Ecdsa/KeyParser.php +++ b/src/Signer/Ecdsa/KeyParser.php @@ -20,6 +20,8 @@ /** * Base class for ECDSA signers * + * @internal + * * @author Luís Otávio Cobucci Oblonczyk * @since 3.0.4 */ diff --git a/src/Signer/Hmac.php b/src/Signer/Hmac.php index 7d773a0d..c7f9ac38 100644 --- a/src/Signer/Hmac.php +++ b/src/Signer/Hmac.php @@ -40,6 +40,8 @@ public function doVerify($expected, $payload, Key $key) /** * PHP < 5.6 timing attack safe hash comparison * + * @internal + * * @param string $expected * @param string $generated * @@ -65,6 +67,8 @@ public function hashEquals($expected, $generated) /** * Returns the algorithm name * + * @internal + * * @return string */ abstract public function getAlgorithm(); diff --git a/src/Signer/Rsa.php b/src/Signer/Rsa.php index 0db19c57..40257dcb 100644 --- a/src/Signer/Rsa.php +++ b/src/Signer/Rsa.php @@ -72,6 +72,8 @@ private function validateKey($key) /** * Returns the algorithm name * + * @internal + * * @return string */ abstract public function getAlgorithm();