Method |
Description |
|
__toString ( ) : string |
|
|
generate ( ) : PrivateKey |
Generates an EC private key |
|
getPublicKey ( ) : PublicKey |
|
|
hasValidDec ( ) : boolean |
|
|
hasValidHex ( ) : boolean |
|
|
isValid ( ) : boolean |
Checks to see if the private key value is not empty and
the hex form only contains hexits and the decimal form
only contains devimal digits. |
|
pemDecode ( string $pem_data ) : array |
Decodes PEM data to retrieve the keypair. |
|
pemEncode ( array $keypair ) : string |
Encodes keypair data to PEM format. |
|
serializeSig ( $r, $s ) : string |
ASN.1 DER encodes the signature based on the form:
0x30 + size(all) + 0x02 + size(r) + r + 0x02 + size(s) + s
http://www.itu.int/ITU-T/studygroups/com17/languages/X.690-0207.pdf |
|
setHex ( $hex ) |
*
Use this method if you have a hex-encoded private key
and you want to initialize your private key. |
|
sign ( $data ) : string |
Creates an ECDSA signature of $message |
|