2019-05-29 07:32:53 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
/**
|
|
|
|
* RSASSA_PSS_params
|
|
|
|
*
|
|
|
|
* As defined in https://tools.ietf.org/html/rfc4055#section-3.1
|
|
|
|
*
|
|
|
|
* PHP version 5
|
|
|
|
*
|
|
|
|
* @category File
|
|
|
|
* @package ASN1
|
|
|
|
* @author Jim Wigginton <terrafrost@php.net>
|
|
|
|
* @copyright 2016 Jim Wigginton
|
|
|
|
* @license http://www.opensource.org/licenses/mit-license.html MIT License
|
|
|
|
* @link http://phpseclib.sourceforge.net
|
|
|
|
*/
|
|
|
|
|
2019-11-07 06:41:40 +01:00
|
|
|
namespace phpseclib3\File\ASN1\Maps;
|
2019-05-29 07:32:53 +02:00
|
|
|
|
2019-11-07 06:41:40 +01:00
|
|
|
use phpseclib3\File\ASN1;
|
2019-05-29 07:32:53 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* RSASSA_PSS_params
|
|
|
|
*
|
|
|
|
* @package ASN1
|
|
|
|
* @author Jim Wigginton <terrafrost@php.net>
|
|
|
|
* @access public
|
|
|
|
*/
|
|
|
|
abstract class RSASSA_PSS_params
|
|
|
|
{
|
|
|
|
const MAP = [
|
|
|
|
'type' => ASN1::TYPE_SEQUENCE,
|
|
|
|
'children' => [
|
|
|
|
'hashAlgorithm' => [
|
|
|
|
'constant' => 0,
|
|
|
|
'optional' => true,
|
|
|
|
'explicit' => true,
|
2019-06-02 02:35:17 +02:00
|
|
|
//'default' => 'sha1Identifier'
|
2019-05-29 07:32:53 +02:00
|
|
|
] + HashAlgorithm::MAP,
|
|
|
|
'maskGenAlgorithm' => [
|
|
|
|
'constant' => 1,
|
|
|
|
'optional' => true,
|
|
|
|
'explicit' => true,
|
2019-06-02 02:35:17 +02:00
|
|
|
//'default' => 'mgf1SHA1Identifier'
|
2019-05-29 07:32:53 +02:00
|
|
|
] + MaskGenAlgorithm::MAP,
|
|
|
|
'saltLength' => [
|
|
|
|
'type' => ASN1::TYPE_INTEGER,
|
|
|
|
'constant' => 2,
|
|
|
|
'optional' => true,
|
|
|
|
'explicit' => true,
|
|
|
|
'default' => 20
|
|
|
|
],
|
|
|
|
'trailerField' => [
|
|
|
|
'type' => ASN1::TYPE_INTEGER,
|
|
|
|
'constant' => 3,
|
|
|
|
'optional' => true,
|
|
|
|
'explicit' => true,
|
|
|
|
'default' => 1
|
|
|
|
]
|
|
|
|
]
|
|
|
|
];
|
|
|
|
}
|