Crypt_GPG
[ class tree: Crypt_GPG ] [ index: Crypt_GPG ] [ all elements ]

Class: Crypt_GPG_Signature

Source Location: /Crypt_GPG-1.4.0b4/Crypt/GPG/Signature.php

Class Overview


A class for GPG signature information


Author(s):

Copyright:

  • 2005-2013 silverorange

Methods


Inherited Variables

Inherited Methods


Class Details

[line 59]
A class for GPG signature information

This class is used to store the results of the Crypt_GPG::verify() method.



[ Top ]


Method Detail

__construct (Constructor)   [line 150]

Crypt_GPG_Signature __construct( [Crypt_GPG_Signature|array $signature = null])

Creates a new signature

Signatures can be initialized from an array of named values. Available names are:

  • string id - the unique id of this signature.
  • string fingerprint - the fingerprint of the key used to create the signature. The fingerprint should not contain formatting characters.
  • string keyId - the id of the key used to create the the signature.
  • integer creation - the date the signature was created. This is a UNIX timestamp.
  • integer expiration - the date the signature expired. This is a UNIX timestamp. If the signature does not expire, use 0.
  • boolean valid - whether or not the signature is valid.
  • string userId - the user id associated with the signature. This may also be a Crypt_GPG_UserId object.

  • Access: public

Parameters:

Crypt_GPG_Signature|array   $signature     optional. Either an existing signature object, which is copied; or an array of initial values.

[ Top ]

getCreationDate   [line 253]

integer getCreationDate( )

Gets the creation date of this signature
  • Return: the creation date of this signature. This is a Unix timestamp.
  • Access: public

[ Top ]

getExpirationDate   [line 268]

integer getExpirationDate( )

Gets the expiration date of the signature
  • Return: the expiration date of this signature. This is a Unix timestamp. If this signature does not expire, this will be zero.
  • Access: public

[ Top ]

getId   [line 209]

string getId( )

Gets the id of this signature
  • Return: a base64-encoded string containing a unique id for this signature. This id is used to prevent replay attacks and is not present for all types of signatures.
  • Access: public

[ Top ]

getKeyFingerprint   [line 222]

string getKeyFingerprint( )

Gets the fingerprint of the key used to create this signature
  • Return: the fingerprint of the key used to create this signature.
  • Access: public

[ Top ]

getKeyId   [line 239]

string getKeyId( )

Gets the id of the key used to create this signature

Whereas the fingerprint of the signing key may not always be available (for example if the signature is bad), the id should always be available.

  • Return: the id of the key used to create this signature.
  • Access: public

[ Top ]

getUserId   [line 281]

Crypt_GPG_UserId getUserId( )

Gets the user id associated with this signature
  • Return: the user id associated with this signature.
  • Access: public

[ Top ]

isValid   [line 294]

boolean isValid( )

Gets whether or no this signature is valid
  • Return: true if this signature is valid and false if it is not.
  • Access: public

[ Top ]

setCreationDate   [line 364]

Crypt_GPG_Signature setCreationDate( integer $creationDate)

Sets the creation date of this signature
  • Return: the current object, for fluent interface.
  • Access: public

Parameters:

integer   $creationDate     the creation date of this signature. This is a Unix timestamp.

[ Top ]

setExpirationDate   [line 382]

Crypt_GPG_Signature setExpirationDate( integer $expirationDate)

Sets the expiration date of this signature
  • Return: the current object, for fluent interface.
  • Access: public

Parameters:

integer   $expirationDate     the expiration date of this signature. This is a Unix timestamp. Specify zero if this signature does not expire.

[ Top ]

setId   [line 312]

Crypt_GPG_Signature setId( string $id)

Sets the id of this signature

Parameters:

string   $id     a base64-encoded string containing a unique id for this signature.

[ Top ]

setKeyFingerprint   [line 330]

Crypt_GPG_Signature setKeyFingerprint( string $fingerprint)

Sets the key fingerprint of this signature
  • Return: the current object, for fluent interface.
  • Access: public

Parameters:

string   $fingerprint     the key fingerprint of this signature. This is the fingerprint of the primary key used to create this signature.

[ Top ]

setKeyId   [line 347]

Crypt_GPG_Signature setKeyId( string $id)

Sets the key id of this signature
  • Return: the current object, for fluent interface.
  • Access: public

Parameters:

string   $id     the key id of this signature. This is the id of the primary key used to create this signature.

[ Top ]

setUserId   [line 399]

Crypt_GPG_Signature setUserId( Crypt_GPG_UserId $userId)

Sets the user id associated with this signature
  • Return: the current object, for fluent interface.
  • Access: public

Parameters:

Crypt_GPG_UserId   $userId     the user id associated with this signature.

[ Top ]

setValid   [line 416]

Crypt_GPG_Signature setValid( boolean $isValid)

Sets whether or not this signature is valid
  • Return: the current object, for fluent interface.
  • Access: public

Parameters:

boolean   $isValid     true if this signature is valid and false if it is not.

[ Top ]


Documentation generated on Wed, 13 Mar 2013 18:30:11 +0000 by phpDocumentor 1.4.3. PEAR Logo Copyright © PHP Group 2004.