[ Index ] |
PHP Cross Reference of DokuWiki |
[Source view] [Print] [Project Stats]
Pure-PHP implementation of EC. 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: | 480 lines (13 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
createKey($curve) X-Ref |
Create public / private key pair. return: \phpseclib3\Crypt\EC\PrivateKey param: string $curve |
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 |
getCurve() X-Ref |
Returns the curve Returns a string if it's a named curve, an array if not return: string|array |
getLength() X-Ref |
Returns the key size Quoting https://tools.ietf.org/html/rfc5656#section-2, "The size of a set of elliptic curve domain parameters on a prime curve is defined as the number of bits in the binary representation of the field order, commonly denoted by p. Size on a characteristic-2 curve is defined as the number of bits in the binary representation of the field, commonly denoted by m. A set of elliptic curve domain parameters defines a group of order n generated by a base point P" return: int |
getEngine() X-Ref |
Returns the current engine being used return: string see: self::useInternalEngine() see: self::useBestEngine() |
getEncodedCoordinates() X-Ref |
Returns the public key coordinates as a string Used by ECDH return: string |
getParameters($type = 'PKCS1') X-Ref |
Returns the parameters return: mixed param: string $type optional see: self::getPublicKey() |
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 |
withContext($context = null) X-Ref |
Sets the context Used by Ed25519 / Ed448. param: string $context optional see: self::sign() see: self::verify() |
getContext() X-Ref |
Returns the signature format currently being used |
withHash($hash) X-Ref |
Determines which hashing function should be used param: string $hash |
__toString() X-Ref |
__toString() magic method return: string |