public class OAEPAlgorithmIdentifier extends AlgorithmIdentifier
AlgorithmIdentifier and making them easily accessible.
Note: The definition and ASN.1 structure for the OAEP (Optimal Asymmetric Encryption Padding) AlgorithmIdentifier can be found in PKCS#1 version 2.0.
RSApkcs1, Serialized Form| Constructor and Description |
|---|
OAEPAlgorithmIdentifier()
Creates a new OAEPAlgorithmIdentifier with the params:
|
OAEPAlgorithmIdentifier(AlgorithmIdentifier hashFunc, AlgorithmIdentifier maskGenFunc, AlgorithmIdentifier pSourceFunc)
Instantiates a new OAEPAlgorithmIdentifier by encoding the given params.
|
OAEPAlgorithmIdentifier(ASN1Object params)
Instantiates a new OAEPAlgorithmIdentifier by decoding the given params.
|
OAEPAlgorithmIdentifier(java.io.InputStream in)
Instantiate a new OAEPAlgorithmIdentifier by reading in the
AlgorithmIdentifier from the stream and decoring the resulting parameters. |
OAEPAlgorithmIdentifier(java.lang.String digest, byte[] source) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
clone()
Creates a deep copy of this
OAEPAlgorithmIdentifier object. |
AlgorithmIdentifier |
getHashFunc()
Returns a clone of the hash function
AlgorithmIdentifier held by this AlgorithmIdentifier. |
AlgorithmIdentifier |
getMaskGenFunc()
Returns a clone of the mask generation function
AlgorithmIdentifier held by this AlgorithmIdentifier. |
AlgorithmIdentifier |
getPSourceFunc()
Returns the p source function
AlgorithmIdentifier held by this AlgorithmIdentifier. |
void |
input(java.io.InputStream in)
Reads in the ASN1 representation from the stream and attempts to decode the parameters.
|
equals, getOID, getParameters, hashCode, length, output, readExternal, toString, writeExternalpublic OAEPAlgorithmIdentifier(ASN1Object params) throws AlgorithmIdentifierException
params - are the parameters to be held and decoded for this AlgorithmIdentifierAlgorithmIdentifierException - is thrown if there is a problem decoding the parameters.public OAEPAlgorithmIdentifier()
| hash function | SHA1 |
| mask generation function | MGF1 with SHA1 |
| p source function | pSpecifiedEmptyIdentifier |
public OAEPAlgorithmIdentifier(AlgorithmIdentifier hashFunc, AlgorithmIdentifier maskGenFunc, AlgorithmIdentifier pSourceFunc)
hashFunc - is the AlgorithmIdentifier of the hash function detailed in the RSAES-OAEP-params ASN1 definition.maskGenFunc - is the AlgorithmIdentifier of the mask generation function detailed in the RSAES-OAEP-param ASN1 definition.pSourceFunc - is the AlgorithmIdentifier that indicates the source function to use to generate p.
public OAEPAlgorithmIdentifier(java.lang.String digest,
byte[] source)
public OAEPAlgorithmIdentifier(java.io.InputStream in)
throws java.io.IOException
AlgorithmIdentifier from the stream and decoring the resulting parameters.in - is the InputStream we will read the AlgorithmIdentifier from.java.io.IOException - is thrown if there is a problem reading the AlgorithmIdentifier in from the stream or if there is a problem decoding the parameters.public AlgorithmIdentifier getHashFunc()
AlgorithmIdentifier held by this AlgorithmIdentifier.AlgorithmIdentifier held by this AlgorithmIdentifier.public AlgorithmIdentifier getMaskGenFunc()
AlgorithmIdentifier held by this AlgorithmIdentifier.AlgorithmIdentifier held by this AlgorithmIdentifier.public AlgorithmIdentifier getPSourceFunc()
AlgorithmIdentifier held by this AlgorithmIdentifier.AlgorithmIdentifier.
public void input(java.io.InputStream in)
throws java.io.IOException
input in interface Streamableinput in class AlgorithmIdentifierin - is the InputStream we will read the AlgorithmIdentifier from.java.io.IOException - is thrown if there is a problem reading the AlgorithmIdentifier in from the stream or decoding the parameters.public java.lang.Object clone()
OAEPAlgorithmIdentifier object.clone in class AlgorithmIdentifier