DSA Public Key
author | Jim Wigginton terrafrost@php.net |
---|---|
package | Default |
__construct()
__toString(): string
string
addFileFormat(string $fullname): boolean
The plugin needs to either already be loaded or be auto-loadable. Loading a plugin whose shortname overwrite an existing shortname will overwrite the old plugin.
see | \phpseclib3\Crypt\Common\AsymmetricKey::load() |
---|
string
boolean
bits2int(string $in): \phpseclib3\Math\BigInteger
bits2octets(string $in): string
string
string
computek(string $h1): string
string
string
createKey(array<mixed,integer> $args): \phpseclib3\Crypt\DSA\PrivateKey
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
array<mixed,integer>
\phpseclib3\Crypt\DSA\PrivateKey
createParameters(integer $L = 2048,integer $N = 224): \phpseclib3\Crypt\DSA|boolean
getComment(): null|string
Not all key formats support comments. If you want to set a comment use toString()
null|string
getEngine(): string
see | self::useInternalEngine()self::useBestEngine() |
---|---|
string
getFingerprint(string $algorithm = 'md5'): mixed
The public key's fingerprint is returned, which is equivalent to running ssh-keygen -lf rsa.pub
. If there is
no public key currently loaded, false is returned.
Example output (md5): "c1:b1:30:29:d7:b8:de:6c:97:77:10:d7:46:41:63:87" (as specified by RFC 4716)
string
The hashing algorithm to be used. Valid options are 'md5' and 'sha256'. False is returned for invalid values.
mixed
getHash()
getLength(): array
More specifically, this L (the length of DSA Prime P) and N (the length of DSA Group Order q)
array
getLoadedFormat(): mixed
If the key that was loaded wasn't in a valid or if the key was auto-generated with RSA::createKey() then this will throw an exception.
see | \phpseclib3\Crypt\Common\AsymmetricKey::load() |
---|---|
mixed
getParameters(): mixed
A public / private key is only returned if the currently loaded "key" contains an x or y value.
see | self::getPublicKey() |
---|---|
mixed
getSignatureFormat()
getSupportedKeyFormats(): array
array
initialize_static_variables()
int2octets(\phpseclib3\Math\BigInteger $v): string
load(string $key,string $password = false): \phpseclib3\Crypt\Common\AsymmetricKey
loadFormat(string $type,string $key,string $password = false): static
string
string
string
optional
static
loadParameters(string|array $key): \phpseclib3\Crypt\Common\AsymmetricKey
loadParametersFormat(string $type,string|array $key): \phpseclib3\Crypt\Common\AsymmetricKey
loadPlugins(string $format)
string
loadPrivateKey(string|array $key,string $password = ''): \phpseclib3\Crypt\Common\PrivateKey
loadPrivateKeyFormat(string $type,string $key,string $password = false): \phpseclib3\Crypt\Common\PrivateKey
string
string
string
optional
\phpseclib3\Crypt\Common\PrivateKey
loadPublicKey(string|array $key): \phpseclib3\Crypt\Common\PublicKey
loadPublicKeyFormat(string $type,string $key): \phpseclib3\Crypt\Common\PublicKey
onLoad(array $components): boolean
array
boolean
toString(string $type,array $options = array()): string
string
array
string
useBestEngine()
useInternalEngine()
validatePlugin(string $format,string $type,string $method = null): mixed
string
string
string
optional
mixed
verify(string $message,string $signature): mixed
see | \phpseclib3\Crypt\DSA\PublicKey::verify() |
---|
string
string
mixed
withHash(string $hash)
string
withSignatureFormat(string $format)
Valid values are: ASN1, SSH2, Raw
string
ALGORITHM
var |
---|
q :\phpseclib3\Math\BigInteger
g :\phpseclib3\Math\BigInteger
y :\phpseclib3\Math\BigInteger
sigFormat :string
var |
---|
string
shortFormat :string
var |
---|
string
zero :\phpseclib3\Math\BigInteger
one :\phpseclib3\Math\BigInteger
format :string
var |
---|
string
plugins :array
see | |
---|---|
var |
array
invisiblePlugins :array
see | |
---|---|
var |
array
engines :array<mixed,boolean>
var |
---|
array<mixed,boolean>
Key Comment
Type(s)
null|string