[ Index ]

PHP Cross Reference of DokuWiki

title

Body

[close]

/vendor/phpseclib/phpseclib/phpseclib/Crypt/ -> DSA.php (summary)

Pure-PHP FIPS 186-4 compliant implementation of DSA. PHP version 5

Author: Jim Wigginton
Copyright: 2016 Jim Wigginton
License: http://www.opensource.org/licenses/mit-license.html MIT License
Link: http://phpseclib.sourceforge.net
File Size: 337 lines (9 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 9 functions

  createParameters()
  createKey()
  onLoad()
  __construct()
  getLength()
  getEngine()
  getParameters()
  withSignatureFormat()
  getSignatureFormat()

Functions
Functions that are not part of a class:

createParameters($L = 2048, $N = 224)   X-Ref
Create DSA parameters

return: \phpseclib3\Crypt\DSA|bool
param: int $L
param: int $N

createKey(...$args)   X-Ref
Create public / private key pair.

This method is a bit polymorphic. It can take a DSA/Parameters object, L / N as two distinct parameters or
no parameters (at which point L and N will be generated with this method)

Returns the private key, from which the publickey can be extracted

return: DSA\PrivateKey
param: int[] ...$args

onLoad(array $components)   X-Ref
OnLoad Handler

return: bool

__construct()   X-Ref
Constructor

PublicKey and PrivateKey objects can only be created from abstract RSA class

getLength()   X-Ref
Returns the key size

More specifically, this L (the length of DSA Prime P) and N (the length of DSA Group Order q)

return: array

getEngine()   X-Ref
Returns the current engine being used

see: self::useInternalEngine()
see: self::useBestEngine()
return: string

getParameters()   X-Ref
Returns the parameters

A public / private key is only returned if the currently loaded "key" contains an x or y
value.

see: self::getPublicKey()
return: mixed

withSignatureFormat($format)   X-Ref
Determines the signature padding mode

Valid values are: ASN1, SSH2, Raw

param: string $format

getSignatureFormat()   X-Ref
Returns the signature format currently being used