Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Reading and writing ASN.1 encoded data to/from ``PotentASN1/ASN1`` tree values.
```swift
import PotentASN1

let asn1Value = ASN1Serialization.asn1(fromDER: derData)
let asn1Value = try ASN1Serialization.asn1(fromDER: derData)
```

### Writing ASN.1
Expand All @@ -24,7 +24,7 @@ let asn1Value = ASN1Serialization.asn1(fromDER: derData)
```swift
import PotentASN1

let derData = ASN1Serialization.der(from: .sequence([.utf8String("Hello ASN.1"), .integer(5)]))
let derData = try ASN1Serialization.der(from: .sequence([.utf8String("Hello ASN.1"), .integer(5)]))
print(derData.base64EncodedString())
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Use ASN.1 schemas to encode and decode to or from Swift structs and classes.
ASN.1 is a position based format and lacks encoded field names for it's values; instead ASN.1 provides field names
and formats via ASN.1 schema notation.

To allow mapping ASN.1 data to Swift structures and classes, ``PotentASN1/ASN1Encoder`` and ``PotentASN1/ASN1Encoder``
To allow mapping ASN.1 data to Swift structures and classes, ``PotentASN1/ASN1Encoder`` and ``PotentASN1/ASN1Decoder``
require a provided ``PotentASN1/Schema`` to direct the encoding and/or decoding of Swift types.

For example, the following is the schema for RFC-5280's `Certificate`:
Expand Down
Loading