Subversion Repositories oidplus

Rev

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   EC
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 23... Line 25...
23
use phpseclib3\Math\BigInteger;
25
use phpseclib3\Math\BigInteger;
24
 
26
 
25
/**
27
/**
26
 * OpenSSH Formatted EC Key Handler
28
 * OpenSSH Formatted EC Key Handler
27
 *
29
 *
-
 
30
 * @package EC
28
 * @author  Jim Wigginton <terrafrost@php.net>
31
 * @author  Jim Wigginton <terrafrost@php.net>
-
 
32
 * @access  public
29
 */
33
 */
30
abstract class OpenSSH extends Progenitor
34
abstract class OpenSSH extends Progenitor
31
{
35
{
32
    use Common;
36
    use Common;
33
 
37
 
Line 44... Line 48...
44
    ];
48
    ];
45
 
49
 
46
    /**
50
    /**
47
     * Break a public or private key down into its constituent components
51
     * Break a public or private key down into its constituent components
48
     *
52
     *
-
 
53
     * @access public
49
     * @param string $key
54
     * @param string $key
50
     * @param string $password optional
55
     * @param string $password optional
51
     * @return array
56
     * @return array
52
     */
57
     */
53
    public static function load($key, $password = '')
58
    public static function load($key, $password = '')
Line 132... Line 137...
132
    }
137
    }
133
 
138
 
134
    /**
139
    /**
135
     * Convert an EC public key to the appropriate format
140
     * Convert an EC public key to the appropriate format
136
     *
141
     *
-
 
142
     * @access public
137
     * @param \phpseclib3\Crypt\EC\BaseCurves\Base $curve
143
     * @param \phpseclib3\Crypt\EC\BaseCurves\Base $curve
138
     * @param \phpseclib3\Math\Common\FiniteField\Integer[] $publicKey
144
     * @param \phpseclib3\Math\Common\FiniteField\Integer[] $publicKey
139
     * @param array $options optional
145
     * @param array $options optional
140
     * @return string
146
     * @return string
141
     */
147
     */
Line 169... Line 175...
169
    }
175
    }
170
 
176
 
171
    /**
177
    /**
172
     * Convert a private key to the appropriate format.
178
     * Convert a private key to the appropriate format.
173
     *
179
     *
-
 
180
     * @access public
174
     * @param \phpseclib3\Math\BigInteger $privateKey
181
     * @param \phpseclib3\Math\BigInteger $privateKey
175
     * @param \phpseclib3\Crypt\EC\Curves\Ed25519 $curve
182
     * @param \phpseclib3\Crypt\EC\Curves\Ed25519 $curve
176
     * @param \phpseclib3\Math\Common\FiniteField\Integer[] $publicKey
183
     * @param \phpseclib3\Math\Common\FiniteField\Integer[] $publicKey
177
     * @param string $password optional
184
     * @param string $password optional
178
     * @param array $options optional
185
     * @param array $options optional