Package org.conscrypt
Class OAEPParameters
java.lang.Object
java.security.AlgorithmParametersSpi
org.conscrypt.OAEPParameters
AlgorithmParameters implementation for OAEP. The only supported encoding format is ASN.1,
as specified in RFC 4055 section 4.1.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final String
private static final String
private OAEPParameterSpec
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected byte[]
protected byte[]
engineGetEncoded
(String format) protected <T extends AlgorithmParameterSpec>
TengineGetParameterSpec
(Class<T> aClass) protected void
engineInit
(byte[] bytes) protected void
engineInit
(byte[] bytes, String format) protected void
engineInit
(AlgorithmParameterSpec algorithmParameterSpec) protected String
private static String
getHashName
(long hashRef) (package private) static String
readHash
(long seqRef) (package private) static String
readMgfHash
(long seqRef) private static long
writeAlgorithmIdentifier
(long container, String oid) Writes an ASN.1 AlgorithmIdentifier structure into container, which looks like(package private) static void
writeHashAndMgfHash
(long seqRef, String hash, MGF1ParameterSpec mgfSpec)
-
Field Details
-
OID_TO_NAME
-
NAME_TO_OID
-
MGF1_OID
- See Also:
-
PSPECIFIED_OID
- See Also:
-
spec
-
-
Constructor Details
-
OAEPParameters
public OAEPParameters()
-
-
Method Details
-
engineInit
protected void engineInit(AlgorithmParameterSpec algorithmParameterSpec) throws InvalidParameterSpecException - Specified by:
engineInit
in classAlgorithmParametersSpi
- Throws:
InvalidParameterSpecException
-
engineInit
- Specified by:
engineInit
in classAlgorithmParametersSpi
- Throws:
IOException
-
engineInit
- Specified by:
engineInit
in classAlgorithmParametersSpi
- Throws:
IOException
-
readHash
- Throws:
IOException
-
readMgfHash
- Throws:
IOException
-
getHashName
- Throws:
IOException
-
engineGetParameterSpec
protected <T extends AlgorithmParameterSpec> T engineGetParameterSpec(Class<T> aClass) throws InvalidParameterSpecException - Specified by:
engineGetParameterSpec
in classAlgorithmParametersSpi
- Throws:
InvalidParameterSpecException
-
engineGetEncoded
- Specified by:
engineGetEncoded
in classAlgorithmParametersSpi
- Throws:
IOException
-
engineGetEncoded
- Specified by:
engineGetEncoded
in classAlgorithmParametersSpi
- Throws:
IOException
-
writeHashAndMgfHash
static void writeHashAndMgfHash(long seqRef, String hash, MGF1ParameterSpec mgfSpec) throws IOException - Throws:
IOException
-
writeAlgorithmIdentifier
Writes an ASN.1 AlgorithmIdentifier structure into container, which looks likeSEQUENCE OBJECT IDENTIFIER PARAMS (based on the particular algorithm)
This method returns a reference to the sequence such that the params may be added to it. The reference needs to be freed with asn1_write_free once it's used.- Throws:
IOException
-
engineToString
- Specified by:
engineToString
in classAlgorithmParametersSpi
-