Method | Description | |
---|---|---|
__construct ( OpenPGP_PublicKeyPacket $key ) | Constructor. | |
generate ( phpseclib\Math\BigInteger $p, phpseclib\Math\BigInteger $q, phpseclib\Math\BigInteger $g ) : array | DSA keypair creation. | |
randomNumber ( phpseclib\Math\BigInteger $q ) : phpseclib\Math\BigInteger | Generate a number that lies between 0 and q-1. | |
sign ( string $message, string $hash_alg ) : array | DSA sign. | |
verify ( string $message, string $hash_alg, phpseclib\Math\BigInteger $r, phpseclib\Math\BigInteger $s ) : boolean | DSA verify. |
public __construct ( OpenPGP_PublicKeyPacket $key ) | ||
$key | OpenPGP_PublicKeyPacket | Key data. |
public generate ( phpseclib\Math\BigInteger $p, phpseclib\Math\BigInteger $q, phpseclib\Math\BigInteger $g ) : array | ||
$p | phpseclib\Math\BigInteger | p |
$q | phpseclib\Math\BigInteger | q |
$g | phpseclib\Math\BigInteger | g |
return | array | Keys: - x: (\phpseclib\Math\BigInteger) Private key. - y: (\phpseclib\Math\BigInteger) Public key. |
public static randomNumber ( phpseclib\Math\BigInteger $q ) : phpseclib\Math\BigInteger | ||
$q | phpseclib\Math\BigInteger | Max number. |
return | phpseclib\Math\BigInteger | Generated number. |