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

Class: Crypt_GPG_Signature

Source Location: /Crypt_GPG-1.6.4/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 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 149]

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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 Sun, 22 Mar 2020 08:01:07 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.