From 7ef3864d22d691f16704eb62d1003ece0e1e5ee8 Mon Sep 17 00:00:00 2001 From: terrafrost Date: Wed, 28 Jun 2017 23:19:50 -0500 Subject: [PATCH] RSA: RSAKeyValue -> RSAKeyPair for XML private keys --- phpseclib/Crypt/RSA/Keys/XML.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/phpseclib/Crypt/RSA/Keys/XML.php b/phpseclib/Crypt/RSA/Keys/XML.php index f39aaafd..a31a4be0 100644 --- a/phpseclib/Crypt/RSA/Keys/XML.php +++ b/phpseclib/Crypt/RSA/Keys/XML.php @@ -6,7 +6,9 @@ * More info: * * http://www.w3.org/TR/xmldsig-core/#sec-RSAKeyValue + * http://www.w3.org/TR/xkms2/#XKMS_2_0_Paragraph_269 * http://en.wikipedia.org/wiki/XML_Signature + * http://en.wikipedia.org/wiki/XKMS * * PHP version 5 * @@ -121,7 +123,7 @@ abstract class XML if (count($primes) != 2) { throw new \InvalidArgumentException('XML does not support multi-prime RSA keys'); } - return "\r\n" . + return "\r\n" . ' ' . Base64::encode($n->toBytes()) . "\r\n" . ' ' . Base64::encode($e->toBytes()) . "\r\n" . '

' . Base64::encode($primes[1]->toBytes()) . "

\r\n" . @@ -130,7 +132,7 @@ abstract class XML ' ' . Base64::encode($exponents[2]->toBytes()) . "\r\n" . ' ' . Base64::encode($coefficients[2]->toBytes()) . "\r\n" . ' ' . Base64::encode($d->toBytes()) . "\r\n" . - '
'; + ''; } /**