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