Rev 846 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 846 | Rev 874 | ||
---|---|---|---|
Line 10... | Line 10... | ||
10 | * http://en.wikipedia.org/wiki/XML_Signature |
10 | * http://en.wikipedia.org/wiki/XML_Signature |
11 | * http://en.wikipedia.org/wiki/XKMS |
11 | * http://en.wikipedia.org/wiki/XKMS |
12 | * |
12 | * |
13 | * PHP version 5 |
13 | * PHP version 5 |
14 | * |
14 | * |
- | 15 | * @category Crypt |
|
- | 16 | * @package RSA |
|
15 | * @author Jim Wigginton <terrafrost@php.net> |
17 | * @author Jim Wigginton <terrafrost@php.net> |
16 | * @copyright 2015 Jim Wigginton |
18 | * @copyright 2015 Jim Wigginton |
17 | * @license http://www.opensource.org/licenses/mit-license.html MIT License |
19 | * @license http://www.opensource.org/licenses/mit-license.html MIT License |
18 | * @link http://phpseclib.sourceforge.net |
20 | * @link http://phpseclib.sourceforge.net |
19 | */ |
21 | */ |
Line 27... | Line 29... | ||
27 | use phpseclib3\Math\BigInteger; |
29 | use phpseclib3\Math\BigInteger; |
28 | 30 | ||
29 | /** |
31 | /** |
30 | * XML Formatted RSA Key Handler |
32 | * XML Formatted RSA Key Handler |
31 | * |
33 | * |
- | 34 | * @package RSA |
|
32 | * @author Jim Wigginton <terrafrost@php.net> |
35 | * @author Jim Wigginton <terrafrost@php.net> |
- | 36 | * @access public |
|
33 | */ |
37 | */ |
34 | abstract class XML |
38 | abstract class XML |
35 | { |
39 | { |
36 | /** |
40 | /** |
37 | * Break a public or private key down into its constituent components |
41 | * Break a public or private key down into its constituent components |
38 | * |
42 | * |
- | 43 | * @access public |
|
39 | * @param string $key |
44 | * @param string $key |
40 | * @param string $password optional |
45 | * @param string $password optional |
41 | * @return array |
46 | * @return array |
42 | */ |
47 | */ |
43 | public static function load($key, $password = '') |
48 | public static function load($key, $password = '') |
Line 122... | Line 127... | ||
122 | } |
127 | } |
123 | 128 | ||
124 | /** |
129 | /** |
125 | * Convert a private key to the appropriate format. |
130 | * Convert a private key to the appropriate format. |
126 | * |
131 | * |
- | 132 | * @access public |
|
127 | * @param \phpseclib3\Math\BigInteger $n |
133 | * @param \phpseclib3\Math\BigInteger $n |
128 | * @param \phpseclib3\Math\BigInteger $e |
134 | * @param \phpseclib3\Math\BigInteger $e |
129 | * @param \phpseclib3\Math\BigInteger $d |
135 | * @param \phpseclib3\Math\BigInteger $d |
130 | * @param array $primes |
136 | * @param array $primes |
131 | * @param array $exponents |
137 | * @param array $exponents |
Line 156... | Line 162... | ||
156 | } |
162 | } |
157 | 163 | ||
158 | /** |
164 | /** |
159 | * Convert a public key to the appropriate format |
165 | * Convert a public key to the appropriate format |
160 | * |
166 | * |
- | 167 | * @access public |
|
161 | * @param \phpseclib3\Math\BigInteger $n |
168 | * @param \phpseclib3\Math\BigInteger $n |
162 | * @param \phpseclib3\Math\BigInteger $e |
169 | * @param \phpseclib3\Math\BigInteger $e |
163 | * @return string |
170 | * @return string |
164 | */ |
171 | */ |
165 | public static function savePublicKey(BigInteger $n, BigInteger $e) |
172 | public static function savePublicKey(BigInteger $n, BigInteger $e) |