anon.crypto
Class AbstractX509KeyIdentifier

java.lang.Object
  extended by anon.crypto.AbstractX509Extension
      extended by anon.crypto.AbstractX509KeyIdentifier
Direct Known Subclasses:
X509AuthorityKeyIdentifier, X509SubjectKeyIdentifier

public abstract class AbstractX509KeyIdentifier
extends AbstractX509Extension

The key identifier is calculated using a SHA1 hash over the BIT STRING from SubjectPublicKeyInfo as defined in RFC3280. For DSA-PublicKeys the AlgorithmIdentifier of the SubjectPublicKeyInfo MUST contain the DSA-Parameters as specified in RFC 3279

Author:
Rolf Wendolsky, Robert Hirschberger

Field Summary
protected  java.lang.String m_value
           
 
Fields inherited from class anon.crypto.AbstractX509Extension
IDENTIFIER
 
Constructor Summary
AbstractX509KeyIdentifier(org.bouncycastle.asn1.DERSequence a_extension)
          Create a new KeyIdentifier from a BouncyCastle DERSequence
AbstractX509KeyIdentifier(java.lang.String a_identifier, byte[] a_value)
          Create a new KeyIdentifier from a Extension-Identifier an the octets of the Extension.
 
Method Summary
 java.lang.String getValue()
          Returns the key identifier as human-readable hex string of the form A4:54:21:52:F1:...
 java.util.Vector getValues()
          Returns the key identifier as human-readable hex string.
 java.lang.String getValueWithoutColon()
          Returns the key identifier as human-readable hex string without ":" separators.
 
Methods inherited from class anon.crypto.AbstractX509Extension
equals, getBCExtension, getDEROctets, getIdentifier, getInstance, getName, hashCode, isCritical, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

m_value

protected java.lang.String m_value
Constructor Detail

AbstractX509KeyIdentifier

public AbstractX509KeyIdentifier(java.lang.String a_identifier,
                                 byte[] a_value)
Create a new KeyIdentifier from a Extension-Identifier an the octets of the Extension. KeyIdentifier-Extensions (SubjectKeyIdentifier and AuthorityKeyIdentifier) are set to non-critical by default according to RFC 5280.

Parameters:
a_identifier - the extensions identifier String
a_value - the octets of the extenison
See Also:
http://tools.ietf.org/html/rfc5280

AbstractX509KeyIdentifier

public AbstractX509KeyIdentifier(org.bouncycastle.asn1.DERSequence a_extension)
Create a new KeyIdentifier from a BouncyCastle DERSequence

Parameters:
a_extension - the extension as DERSequence
Method Detail

getValue

public java.lang.String getValue()
Returns the key identifier as human-readable hex string of the form A4:54:21:52:F1:...

Returns:
the key identifier as human-readable hex string of the form A4:54:21:52:F1:...

getValueWithoutColon

public java.lang.String getValueWithoutColon()
Returns the key identifier as human-readable hex string without ":" separators.

Returns:
the key identifier as human-readable hex string without ":" separators

getValues

public java.util.Vector getValues()
Returns the key identifier as human-readable hex string.

Specified by:
getValues in class AbstractX509Extension
Returns:
a Vector containing the key identifier as human-readable hex string