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 5... | Line 5... | ||
5 | * |
5 | * |
6 | * PHP version 5 |
6 | * PHP version 5 |
7 | * |
7 | * |
8 | * Place in $HOME/.ssh/authorized_keys |
8 | * Place in $HOME/.ssh/authorized_keys |
9 | * |
9 | * |
- | 10 | * @category Crypt |
|
- | 11 | * @package RSA |
|
10 | * @author Jim Wigginton <terrafrost@php.net> |
12 | * @author Jim Wigginton <terrafrost@php.net> |
11 | * @copyright 2015 Jim Wigginton |
13 | * @copyright 2015 Jim Wigginton |
12 | * @license http://www.opensource.org/licenses/mit-license.html MIT License |
14 | * @license http://www.opensource.org/licenses/mit-license.html MIT License |
13 | * @link http://phpseclib.sourceforge.net |
15 | * @link http://phpseclib.sourceforge.net |
14 | */ |
16 | */ |
Line 20... | Line 22... | ||
20 | use phpseclib3\Math\BigInteger; |
22 | use phpseclib3\Math\BigInteger; |
21 | 23 | ||
22 | /** |
24 | /** |
23 | * OpenSSH Formatted RSA Key Handler |
25 | * OpenSSH Formatted RSA Key Handler |
24 | * |
26 | * |
- | 27 | * @package RSA |
|
25 | * @author Jim Wigginton <terrafrost@php.net> |
28 | * @author Jim Wigginton <terrafrost@php.net> |
- | 29 | * @access public |
|
26 | */ |
30 | */ |
27 | abstract class OpenSSH extends Progenitor |
31 | abstract class OpenSSH extends Progenitor |
28 | { |
32 | { |
29 | /** |
33 | /** |
30 | * Supported Key Types |
34 | * Supported Key Types |
Line 34... | Line 38... | ||
34 | protected static $types = ['ssh-rsa']; |
38 | protected static $types = ['ssh-rsa']; |
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 88... | Line 93... | ||
88 | } |
93 | } |
89 | 94 | ||
90 | /** |
95 | /** |
91 | * Convert a public key to the appropriate format |
96 | * Convert a public key to the appropriate format |
92 | * |
97 | * |
- | 98 | * @access public |
|
93 | * @param \phpseclib3\Math\BigInteger $n |
99 | * @param \phpseclib3\Math\BigInteger $n |
94 | * @param \phpseclib3\Math\BigInteger $e |
100 | * @param \phpseclib3\Math\BigInteger $e |
95 | * @param array $options optional |
101 | * @param array $options optional |
96 | * @return string |
102 | * @return string |
97 | */ |
103 | */ |
Line 110... | Line 116... | ||
110 | } |
116 | } |
111 | 117 | ||
112 | /** |
118 | /** |
113 | * Convert a private key to the appropriate format. |
119 | * Convert a private key to the appropriate format. |
114 | * |
120 | * |
- | 121 | * @access public |
|
115 | * @param \phpseclib3\Math\BigInteger $n |
122 | * @param \phpseclib3\Math\BigInteger $n |
116 | * @param \phpseclib3\Math\BigInteger $e |
123 | * @param \phpseclib3\Math\BigInteger $e |
117 | * @param \phpseclib3\Math\BigInteger $d |
124 | * @param \phpseclib3\Math\BigInteger $d |
118 | * @param array $primes |
125 | * @param array $primes |
119 | * @param array $exponents |
126 | * @param array $exponents |