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

Class: Crypt_GPG_Signature

Source Location: /Crypt_GPG-1.0.0/GPG/Signature.php

Class Overview


A class for GPG signature information


Author(s):

Copyright:

  • 2005-2008 silverorange

Methods


Inherited Variables

Inherited Methods


Class Details

[line 58]
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 140]

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.
  • 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 223]

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 238]

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 196]

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 209]

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 ]

getUserId   [line 251]

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 264]

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 315]

void setCreationDate( integer $creationDate)

Sets the creation date of this signature
  • Access: public

Parameters:

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

[ Top ]

setExpirationDate   [line 332]

void setExpirationDate( integer $expirationDate)

Sets the expiration date of this signature
  • 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 282]

void 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 299]

void setKeyFingerprint( string $fingerprint)

Sets the key fingerprint of this signature
  • Access: public

Parameters:

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

[ Top ]

setUserId   [line 348]

void setUserId( Crypt_GPG_UserId $userId)

Sets the user id associated with this signature
  • Access: public

Parameters:

Crypt_GPG_UserId   $userId     the user id associated with this signature.

[ Top ]

setValid   [line 364]

void setValid( boolean $isValid)

Sets whether or not this signature is valid
  • Access: public

Parameters:

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

[ Top ]


Documentation generated on Thu, 22 Jan 2009 21:30:15 -0500 by phpDocumentor 1.4.0. PEAR Logo Copyright © PHP Group 2004.