Subversion Repositories oidplus

Rev

Rev 846 | Rev 1042 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 846 Rev 874
Line 1... Line 1...
1
<?php
1
<?php
2
 
2
 
3
/**
3
/**
4
 * EC Private Key
4
 * EC Private Key
5
 *
5
 *
-
 
6
 * @category  Crypt
-
 
7
 * @package   EC
6
 * @author    Jim Wigginton <terrafrost@php.net>
8
 * @author    Jim Wigginton <terrafrost@php.net>
7
 * @copyright 2015 Jim Wigginton
9
 * @copyright 2015 Jim Wigginton
8
 * @license   http://www.opensource.org/licenses/mit-license.html  MIT License
10
 * @license   http://www.opensource.org/licenses/mit-license.html  MIT License
9
 * @link      http://phpseclib.sourceforge.net
11
 * @link      http://phpseclib.sourceforge.net
10
 */
12
 */
Line 25... Line 27...
25
use phpseclib3\Math\BigInteger;
27
use phpseclib3\Math\BigInteger;
26
 
28
 
27
/**
29
/**
28
 * EC Private Key
30
 * EC Private Key
29
 *
31
 *
-
 
32
 * @package EC
30
 * @author  Jim Wigginton <terrafrost@php.net>
33
 * @author  Jim Wigginton <terrafrost@php.net>
-
 
34
 * @access  public
31
 */
35
 */
32
class PrivateKey extends EC implements Common\PrivateKey
36
class PrivateKey extends EC implements Common\PrivateKey
33
{
37
{
34
    use Common\Traits\PasswordProtected;
38
    use Common\Traits\PasswordProtected;
35
 
39
 
Line 79... Line 83...
79
 
83
 
80
    /**
84
    /**
81
     * Create a signature
85
     * Create a signature
82
     *
86
     *
83
     * @see self::verify()
87
     * @see self::verify()
-
 
88
     * @access public
84
     * @param string $message
89
     * @param string $message
85
     * @return mixed
90
     * @return mixed
86
     */
91
     */
87
    public function sign($message)
92
    public function sign($message)
88
    {
93
    {
Line 222... Line 227...
222
 
227
 
223
    /**
228
    /**
224
     * Returns the public key
229
     * Returns the public key
225
     *
230
     *
226
     * @see self::getPrivateKey()
231
     * @see self::getPrivateKey()
-
 
232
     * @access public
227
     * @return mixed
233
     * @return mixed
228
     */
234
     */
229
    public function getPublicKey()
235
    public function getPublicKey()
230
    {
236
    {
231
        $format = 'PKCS8';
237
        $format = 'PKCS8';