Bouncy Castle Cryptography Library 1.79

org.bouncycastle.bcpg.sig
Class KeyExpirationTime

java.lang.Object
  |
  +--org.bouncycastle.bcpg.SignatureSubpacket
        |
        +--org.bouncycastle.bcpg.sig.KeyExpirationTime

public class KeyExpirationTime
extends SignatureSubpacket

Signature Subpacket containing the number of seconds after the key's creation date, after which the key expires. The special value of {@code 0} means that the key never expires.

See Also:
RFC4880 - Key Expiration Time, RFC9580 - Key Expiration Time

Fields inherited from class org.bouncycastle.bcpg.SignatureSubpacket
data
 
Constructor Summary
KeyExpirationTime(boolean critical, boolean isLongLength, byte[] data)
           
KeyExpirationTime(boolean critical, long seconds)
           
 
Method Summary
 long getTime()
          Return the number of seconds after creation time a key is valid for.
protected static byte[] timeToBytes(long t)
          Deprecated. Will be removed
 
Methods inherited from class org.bouncycastle.bcpg.SignatureSubpacket
encode, equals, getData, getType, hashCode, isCritical, isLongLength
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KeyExpirationTime

public KeyExpirationTime(boolean critical,
                         boolean isLongLength,
                         byte[] data)

KeyExpirationTime

public KeyExpirationTime(boolean critical,
                         long seconds)
Method Detail

timeToBytes

protected static byte[] timeToBytes(long t)
Deprecated. Will be removed


getTime

public long getTime()
Return the number of seconds after creation time a key is valid for.
Returns:
second count for key validity.

Bouncy Castle Cryptography Library 1.79