anon.crypto
Class X509SubjectKeyIdentifier

java.lang.Object
  extended by anon.crypto.AbstractX509Extension
      extended by anon.crypto.X509SubjectKeyIdentifier

public final class X509SubjectKeyIdentifier
extends AbstractX509Extension

The subject public 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

Field Summary
static java.lang.String IDENTIFIER
           
private  java.lang.String m_value
           
 
Constructor Summary
X509SubjectKeyIdentifier(org.bouncycastle.asn1.DERSequence a_extension)
          Creates an extension from a BouncyCastle DER sequence.
X509SubjectKeyIdentifier(IMyPublicKey a_publicKey)
          Creates a new X509SubjectKeyIdentifier from a public key.
 
Method Summary
private static byte[] createDEROctets(IMyPublicKey a_publicKey)
           
private  void createValue()
           
 java.lang.String getName()
          Returns "SubjectKeyIdentifier".
 java.lang.String getValue()
          Returns the subject public key identifier as human-readable hex string of the form A4:54:21:52:F1:...
 java.util.Vector getValues()
          Returns the subject public key identifier as human-readable hex string.
 java.lang.String getValueWithoutColon()
          Returns the subject public key identifier as human-readable hex string without ":" separators.
 
Methods inherited from class anon.crypto.AbstractX509Extension
equals, getBCExtension, getDEROctets, getIdentifier, getInstance, hashCode, isCritical, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

IDENTIFIER

public static final java.lang.String IDENTIFIER

m_value

private java.lang.String m_value
Constructor Detail

X509SubjectKeyIdentifier

public X509SubjectKeyIdentifier(IMyPublicKey a_publicKey)
Creates a new X509SubjectKeyIdentifier from a public key.

Parameters:
a_publicKey - a public key

X509SubjectKeyIdentifier

public X509SubjectKeyIdentifier(org.bouncycastle.asn1.DERSequence a_extension)
Creates an extension from a BouncyCastle DER sequence. For internal use only.

Parameters:
a_extension - a DERSequence
Method Detail

getName

public java.lang.String getName()
Returns "SubjectKeyIdentifier".

Specified by:
getName in class AbstractX509Extension
Returns:
"SubjectKeyIdentifier"

getValue

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

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

getValueWithoutColon

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

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

getValues

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

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

createDEROctets

private static byte[] createDEROctets(IMyPublicKey a_publicKey)

createValue

private void createValue()