This class is used to store the results of the Crypt_GPG::getKeys() method. Sub-key objects are members of a Crypt_GPG_Key object.
Crypt_GPG_SubKey __construct( [Crypt_GPG_SubKey|string|array $key = null])
Sub-keys can be initialized from an array of named values. Available names are:
boolean canEncrypt( )
boolean canSign( )
integer getAlgorithm( )
The algorithm should be one of the Crypt_GPG_SubKey::ALGORITHM_* constants.
integer getCreationDate( )
This is a Unix timestamp.
integer getExpirationDate( )
This is a Unix timestamp. If this sub-key does not expire, this will be zero.
string getFingerprint( )
string getId( )
integer getLength( )
boolean hasPrivate( )
Crypt_GPG_SubKey parse( string $string)
See doc/DETAILS in the GPG distribution for information on how the sub-key string is parsed.
void setAlgorithm( integer $algorithm)
void setCanEncrypt( boolean $canEncrypt)
void setCanSign( boolean $canSign)
void setCreationDate( integer $creationDate)
The creation date is a Unix timestamp.
void setExpirationDate( integer $expirationDate)
The expiration date is a Unix timestamp. Specify zero if this sub-key does not expire.
void setFingerprint( string $fingerprint)
void setHasPrivate( boolean $hasPrivate)
void setId( string $id)
void setLength( integer $length)