Subversion Repositories oidplus

Rev

Rev 874 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 874 Rev 1042
Line 6... Line 6...
6
 * PHP version 5
6
 * PHP version 5
7
 *
7
 *
8
 * Handles signatures in the format described in
8
 * Handles signatures in the format described in
9
 * https://tools.ietf.org/html/rfc3279#section-2.2.2
9
 * https://tools.ietf.org/html/rfc3279#section-2.2.2
10
 *
10
 *
11
 * @category  Crypt
-
 
12
 * @package   Common
-
 
13
 * @author    Jim Wigginton <terrafrost@php.net>
11
 * @author    Jim Wigginton <terrafrost@php.net>
14
 * @copyright 2016 Jim Wigginton
12
 * @copyright 2016 Jim Wigginton
15
 * @license   http://www.opensource.org/licenses/mit-license.html  MIT License
13
 * @license   http://www.opensource.org/licenses/mit-license.html  MIT License
16
 * @link      http://phpseclib.sourceforge.net
14
 * @link      http://phpseclib.sourceforge.net
17
 */
15
 */
Line 23... Line 21...
23
use phpseclib3\Math\BigInteger;
21
use phpseclib3\Math\BigInteger;
24
 
22
 
25
/**
23
/**
26
 * ASN1 Signature Handler
24
 * ASN1 Signature Handler
27
 *
25
 *
28
 * @package Common
-
 
29
 * @author  Jim Wigginton <terrafrost@php.net>
26
 * @author  Jim Wigginton <terrafrost@php.net>
30
 * @access  public
-
 
31
 */
27
 */
32
abstract class ASN1
28
abstract class ASN1
33
{
29
{
34
    /**
30
    /**
35
     * Loads a signature
31
     * Loads a signature
36
     *
32
     *
37
     * @access public
-
 
38
     * @param string $sig
33
     * @param string $sig
39
     * @return array|bool
34
     * @return array|bool
40
     */
35
     */
41
    public static function load($sig)
36
    public static function load($sig)
42
    {
37
    {
Line 54... Line 49...
54
    }
49
    }
55
 
50
 
56
    /**
51
    /**
57
     * Returns a signature in the appropriate format
52
     * Returns a signature in the appropriate format
58
     *
53
     *
59
     * @access public
-
 
60
     * @param \phpseclib3\Math\BigInteger $r
54
     * @param \phpseclib3\Math\BigInteger $r
61
     * @param \phpseclib3\Math\BigInteger $s
55
     * @param \phpseclib3\Math\BigInteger $s
62
     * @return string
56
     * @return string
63
     */
57
     */
64
    public static function save(BigInteger $r, BigInteger $s)
58
    public static function save(BigInteger $r, BigInteger $s)