de.flexiprovider.pqc.pflash
Class PFlashPublicKey

java.lang.Object
  |
  +--de.flexiprovider.api.keys.PublicKey
        |
        +--de.flexiprovider.pqc.pflash.PFlashPublicKey
All Implemented Interfaces:
java.security.Key, Key, java.security.PublicKey, java.io.Serializable

public class PFlashPublicKey
extends PublicKey

This class implements a pFLASH public key and is usually instantiated by the PFlashKeyPairGenerator.

Author:
Marian Hornschuch, Alexander Koller
See Also:
PFlashKeyPairGenerator, PFlashPublicKey, Serialized Form

Field Summary
(package private)  PFlashPublicKeyElement[] ppke
           
 
Fields inherited from interface java.security.Key
serialVersionUID
 
Fields inherited from interface java.security.PublicKey
serialVersionUID
 
Constructor Summary
protected PFlashPublicKey(int size)
          Construct a new public pFLASH key.
protected PFlashPublicKey(PFlashPublicKeySpec keySpec)
          Construct a new public pFLASH key from the given key specification.
 
Method Summary
 void addElement(PFlashPublicKeyElement addppke)
           
 boolean equals(java.lang.Object other)
          Compare this key with another object.
 java.lang.String getAlgorithm()
           
protected  codec.asn1.ASN1Type getAlgParams()
           
 PFlashPublicKeyElement getElement(int i)
           
protected  byte[] getKeyData()
           
protected  codec.asn1.ASN1ObjectIdentifier getOID()
           
protected  java.lang.String getOIDString()
           
 int hashCode()
           
 java.lang.String toString()
          Not supported
 
Methods inherited from class de.flexiprovider.api.keys.PublicKey
getEncoded, getFormat
 
Methods inherited from class java.lang.Object
, clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

ppke

PFlashPublicKeyElement[] ppke
Constructor Detail

PFlashPublicKey

protected PFlashPublicKey(int size)
Construct a new public pFLASH key. FIXME
Parameters:
publicKeyBytes - the key bytes

PFlashPublicKey

protected PFlashPublicKey(PFlashPublicKeySpec keySpec)
Construct a new public pFLASH key from the given key specification.
Parameters:
keySpec - a PFlashPublicKeySpec
Method Detail

getAlgorithm

public java.lang.String getAlgorithm()
Returns:
the OID of the algorithm

addElement

public void addElement(PFlashPublicKeyElement addppke)

getElement

public PFlashPublicKeyElement getElement(int i)

equals

public boolean equals(java.lang.Object other)
Compare this key with another object.
Overrides:
equals in class java.lang.Object
Parameters:
other - the other object
Returns:
true if both are equal

getOID

protected codec.asn1.ASN1ObjectIdentifier getOID()
Overrides:
getOID in class PublicKey
Following copied from class: de.flexiprovider.api.keys.PublicKey
Returns:
the OID to encode in the SubjectPublicKeyInfo structure

getOIDString

protected java.lang.String getOIDString()

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()
Not supported
Overrides:
toString in class java.lang.Object

getAlgParams

protected codec.asn1.ASN1Type getAlgParams()
Overrides:
getAlgParams in class PublicKey
Returns:
the algorithm parameters to encode in the SubjectPublicKeyInfo structure

getKeyData

protected byte[] getKeyData()
Overrides:
getKeyData in class PublicKey
Returns:
the keyData to encode in the SubjectKeyInfo structure