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 8... | Line 8... | ||
8 | * won't accept them. Since PuTTY formatted keys are primarily used with SSH this makes |
8 | * won't accept them. Since PuTTY formatted keys are primarily used with SSH this makes |
9 | * keys with N > 160 kinda useless, hence this handlers not supporting such keys. |
9 | * keys with N > 160 kinda useless, hence this handlers not supporting such keys. |
10 | * |
10 | * |
11 | * PHP version 5 |
11 | * PHP version 5 |
12 | * |
12 | * |
- | 13 | * @category Crypt |
|
- | 14 | * @package DSA |
|
13 | * @author Jim Wigginton <terrafrost@php.net> |
15 | * @author Jim Wigginton <terrafrost@php.net> |
14 | * @copyright 2015 Jim Wigginton |
16 | * @copyright 2015 Jim Wigginton |
15 | * @license http://www.opensource.org/licenses/mit-license.html MIT License |
17 | * @license http://www.opensource.org/licenses/mit-license.html MIT License |
16 | * @link http://phpseclib.sourceforge.net |
18 | * @link http://phpseclib.sourceforge.net |
17 | */ |
19 | */ |
Line 23... | Line 25... | ||
23 | use phpseclib3\Math\BigInteger; |
25 | use phpseclib3\Math\BigInteger; |
24 | 26 | ||
25 | /** |
27 | /** |
26 | * PuTTY Formatted DSA Key Handler |
28 | * PuTTY Formatted DSA Key Handler |
27 | * |
29 | * |
- | 30 | * @package DSA |
|
28 | * @author Jim Wigginton <terrafrost@php.net> |
31 | * @author Jim Wigginton <terrafrost@php.net> |
- | 32 | * @access public |
|
29 | */ |
33 | */ |
30 | abstract class PuTTY extends Progenitor |
34 | abstract class PuTTY extends Progenitor |
31 | { |
35 | { |
32 | /** |
36 | /** |
33 | * Public Handler |
37 | * Public Handler |
34 | * |
38 | * |
35 | * @var string |
39 | * @var string |
- | 40 | * @access private |
|
36 | */ |
41 | */ |
37 | const PUBLIC_HANDLER = 'phpseclib3\Crypt\DSA\Formats\Keys\OpenSSH'; |
42 | const PUBLIC_HANDLER = 'phpseclib3\Crypt\DSA\Formats\Keys\OpenSSH'; |
38 | 43 | ||
39 | /** |
44 | /** |
40 | * Algorithm Identifier |
45 | * Algorithm Identifier |
41 | * |
46 | * |
42 | * @var array |
47 | * @var array |
- | 48 | * @access private |
|
43 | */ |
49 | */ |
44 | protected static $types = ['ssh-dss']; |
50 | protected static $types = ['ssh-dss']; |
45 | 51 | ||
46 | /** |
52 | /** |
47 | * Break a public or private key down into its constituent components |
53 | * Break a public or private key down into its constituent components |
48 | * |
54 | * |
- | 55 | * @access public |
|
49 | * @param string $key |
56 | * @param string $key |
50 | * @param string $password optional |
57 | * @param string $password optional |
51 | * @return array |
58 | * @return array |
52 | */ |
59 | */ |
53 | public static function load($key, $password = '') |
60 | public static function load($key, $password = '') |
Line 66... | Line 73... | ||
66 | } |
73 | } |
67 | 74 | ||
68 | /** |
75 | /** |
69 | * Convert a private key to the appropriate format. |
76 | * Convert a private key to the appropriate format. |
70 | * |
77 | * |
- | 78 | * @access public |
|
71 | * @param \phpseclib3\Math\BigInteger $p |
79 | * @param \phpseclib3\Math\BigInteger $p |
72 | * @param \phpseclib3\Math\BigInteger $q |
80 | * @param \phpseclib3\Math\BigInteger $q |
73 | * @param \phpseclib3\Math\BigInteger $g |
81 | * @param \phpseclib3\Math\BigInteger $g |
74 | * @param \phpseclib3\Math\BigInteger $y |
82 | * @param \phpseclib3\Math\BigInteger $y |
75 | * @param \phpseclib3\Math\BigInteger $x |
83 | * @param \phpseclib3\Math\BigInteger $x |
Line 90... | Line 98... | ||
90 | } |
98 | } |
91 | 99 | ||
92 | /** |
100 | /** |
93 | * Convert a public key to the appropriate format |
101 | * Convert a public key to the appropriate format |
94 | * |
102 | * |
- | 103 | * @access public |
|
95 | * @param \phpseclib3\Math\BigInteger $p |
104 | * @param \phpseclib3\Math\BigInteger $p |
96 | * @param \phpseclib3\Math\BigInteger $q |
105 | * @param \phpseclib3\Math\BigInteger $q |
97 | * @param \phpseclib3\Math\BigInteger $g |
106 | * @param \phpseclib3\Math\BigInteger $g |
98 | * @param \phpseclib3\Math\BigInteger $y |
107 | * @param \phpseclib3\Math\BigInteger $y |
99 | * @return string |
108 | * @return string |