com.didisoft.pgp
Class KeyPairInformation.SubKey

java.lang.Object
  extended by com.didisoft.pgp.KeyPairInformation.SubKey
All Implemented Interfaces:
java.io.Serializable
Enclosing class:
KeyPairInformation

public class KeyPairInformation.SubKey
extends java.lang.Object
implements java.io.Serializable

Represents a sub key in a key ring

See Also:
Serialized Form

Constructor Summary
KeyPairInformation.SubKey(PGPPublicKey key)
           
 
Method Summary
 java.lang.String getAlgorithm()
          Returns the name of the key encryption asymmetric algorithm.
 java.util.Date getCreationTime()
          Returns when was the key created.
 java.lang.String getFingerprint()
          Returns key finger print.
 long getKeyID()
          Returns the Key ID of this key pair.
 java.lang.String getKeyIDHex()
          Returns a string representing the hexadecimal value of the Key ID.
 int getKeySize()
          Returns key size in bits.
 java.lang.String[] getUserIDs()
          Returns User Id's associated with this key.
 int getValidDays()
          Returns key validity period in days.
 int getVersion()
          Returns key format OpenPGP version.
 boolean isEncryptionKey()
          Returns is this Key used for encrypting data.
 boolean isExpired()
          Returns is this Key expired (not usable any more).
 boolean isExpiredOnDate(java.util.Date date)
          Returns is this key expired on a given date
 boolean isRevoked()
          Returns is this Key revoked (not usable any more).
 boolean isSigningKey()
          Returns is this Key used for signing data.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KeyPairInformation.SubKey

public KeyPairInformation.SubKey(PGPPublicKey key)
Method Detail

isEncryptionKey

public boolean isEncryptionKey()
Returns is this Key used for encrypting data.


isSigningKey

public boolean isSigningKey()
Returns is this Key used for signing data.


isExpired

public boolean isExpired()
Returns is this Key expired (not usable any more).

Returns:
true if the key is expired, false if not

isExpiredOnDate

public boolean isExpiredOnDate(java.util.Date date)
Returns is this key expired on a given date

Returns:
true if the key is expired on this date, false if not

isRevoked

public boolean isRevoked()
Returns is this Key revoked (not usable any more).


getKeyID

public long getKeyID()
Returns the Key ID of this key pair.


getKeyIDHex

public java.lang.String getKeyIDHex()
Returns a string representing the hexadecimal value of the Key ID.

(only the lower 4 bytes of the real key id which is 8 bytes.

Since:
2.5.2

getFingerprint

public java.lang.String getFingerprint()
Returns key finger print.


getUserIDs

public java.lang.String[] getUserIDs()
Returns User Id's associated with this key.


getKeySize

public int getKeySize()
Returns key size in bits.


getAlgorithm

public java.lang.String getAlgorithm()
Returns the name of the key encryption asymmetric algorithm.


getCreationTime

public java.util.Date getCreationTime()
Returns when was the key created.


getValidDays

public int getValidDays()
Returns key validity period in days.


getVersion

public int getVersion()
Returns key format OpenPGP version.



Copyright © 2006-2013 DidiSoft Ltd. All Rights Reserved.