public class Asn1DerDecoder extends Object
| Constructor and Description |
|---|
Asn1DerDecoder() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
equalKeyAlgorithmSynonyms(String keyAlgorithm1,
String keyAlgorithm2)
Check for equal key algorithm synonyms.
|
static byte[] |
readOidValue(DatagramReader reader)
Read value of ASN.1 OID into byte array.
|
static byte[] |
readSequenceEntity(DatagramReader reader)
Read entity of ASN.1 SEQUENCE into byte array.
|
static byte[] |
readSequenceValue(DatagramReader reader)
Read value of ASN.1 SEQUENCE into byte array.
|
static String |
readSubjectPublicKeyAlgorithm(byte[] data)
Read key algorithm from subjects public key.
|
public static byte[] readSequenceEntity(DatagramReader reader)
reader - reader containing the bytes to read.IllegalArgumentException - if provided bytes doesn't contain a
SEQUENCE.public static byte[] readSequenceValue(DatagramReader reader)
reader - reader containing the bytes to read.IllegalArgumentException - if provided bytes doesn't contain a
SEQUENCE.public static byte[] readOidValue(DatagramReader reader)
reader - reader containing the bytes to read.IllegalArgumentException - if provided bytes doesn't contain a OID.public static String readSubjectPublicKeyAlgorithm(byte[] data)
SubjectPublicKeyInfo ::= SEQUENCE {
algorithm AlgorithmIdentifier,
subjectPublicKey BIT STRING
}
AlgorithmIdentifier ::= SEQUENCE {
algorithm OBJECT IDENTIFIER,
parameters ANY DEFINED BY algorithm OPTIONAL
}
Figure 2: SubjectPublicKeyInfo ASN.1 Structuredata - byte array containing the subject public key.null,
if the OID of the subject public key is unknown.IllegalArgumentException - if provided bytes doesn't contain a
subject public key.public static boolean equalKeyAlgorithmSynonyms(String keyAlgorithm1, String keyAlgorithm2)
keyAlgorithm1 - key algorithm 1keyAlgorithm2 - key algorithm 2true, if the key algorithms are equal or synonyms,
false, otherwise.Copyright © 2019 Eclipse Foundation. All rights reserved.