Class COSEC509
java.lang.Object
org.bouncycastle.cbor.c509.COSEC509
The COSE_C509 structure (Section 3.4 of draft-ietf-cose-cbor-encoded-cert-20):
COSE_C509 = C509CertData / [ 2* C509CertData ] C509CertData = bytes .cbor C509Certificatea single certificate, or an array of two or more, each wrapped in a byte string so a parser can skip over individual certificates.
-
Method Summary
Modifier and TypeMethodDescriptionstatic C509Certificate[]decode(byte[] encoding) Decode a COSE_C509 structure.static byte[]encode(C509Certificate[] certificates) Encode a bag or chain of certificates as a COSE_C509 structure.
-
Method Details
-
encode
Encode a bag or chain of certificates as a COSE_C509 structure. One certificate is encoded as a bare C509CertData; two or more as an array.- Throws:
IOException
-
decode
Decode a COSE_C509 structure.- Throws:
IOException
-