ASN.1 Decoder for Swift
Generated API docs are available at https://swiftpackageindex.com/gematik/ASN1Kit/documentation/.
This library can be used for ASN.1 (Abstract Syntax Notation One) encoding/decoding using distinguished encoding rules (DER) according to the ITU-T X.690
For more info, please find the complete X.690-0207.pdf specification.
ASN1Kit requires Swift 5.5.
Use ASN1Decoder.decode(asn1:)
to decode serialized data:
link:Tests/ASN1KitTests/encodable/BitStringASN1EncodingTest.swift[role=include]
Construct an ASN1Object
of your choice and serialize it:
link:Tests/ASN1KitTests/encodable/ArrayExtASN1EncodingTest.swift[role=include]
ASN.1-encode Swift primitives and extract the encoded value(s):
link:Tests/ASN1KitTests/encodable/IntExtASN1EncodingTest.swift[role=include]
Extract the tag of the first element of a constructed ASN1Object
:
link:Tests/ASN1KitTests/ASN1ConstructedEncodingTest.swift[role=include]
Apache License Version 2.0
See LICENSE.