Skip to content

Commit

Permalink
Release 2.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
leif-ibsen committed Feb 17, 2022
1 parent b7da07f commit 2149912
Show file tree
Hide file tree
Showing 69 changed files with 825 additions and 855 deletions.
4 changes: 2 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// swift-tools-version:5.3
// swift-tools-version:5.5
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription
Expand All @@ -13,7 +13,7 @@ let package = Package(
],
dependencies: [
// Dependencies declare other packages that this package depends on.
.package(url: "https://github.com/leif-ibsen/BigInt", from: "1.2.5"),
.package(url: "https://github.com/leif-ibsen/BigInt", from: "1.2.12"),
],
targets: [
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ It supports the following ASN1 types:
In your project Package.swift file add a dependency like<br/>

dependencies: [
.package(url: "https://github.com/leif-ibsen/ASN1", from: "2.0.0"),
.package(url: "https://github.com/leif-ibsen/ASN1", from: "2.0.1"),
]

<h3><b>Example 1</b></h3>
Expand Down Expand Up @@ -115,7 +115,7 @@ ASN1 requires Swift 5.0.
The ASN1 package depends on the BigInt package

dependencies: [
.package(url: "https://github.com/leif-ibsen/BigInt", from: "1.2.5"),
.package(url: "https://github.com/leif-ibsen/BigInt", from: "1.2.12"),
],

<h3><b>References</b></h3>
Expand Down
52 changes: 26 additions & 26 deletions Tests/ASN1Tests/ASN1Tests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -101,56 +101,56 @@ final class ASN1Tests: XCTestCase {
func testSequence() {
let date = Date()
let a1 = ASN1Sequence()
a1.add(ASN1IA5String("IA5String"))
a1.add(ASN1.ONE)
a1.add(ASN1ObjectIdentifier("1.2.3")!)
a1.add(ASN1UTCTime(date))
_ = a1.add(ASN1IA5String("IA5String"))
_ = a1.add(ASN1.ONE)
_ = a1.add(ASN1ObjectIdentifier("1.2.3")!)
_ = a1.add(ASN1UTCTime(date))
let a2 = ASN1Sequence()
a2.add(ASN1IA5String("IA5String"))
a2.add(ASN1.ONE)
a2.add(ASN1ObjectIdentifier("1.2.3")!)
_ = a2.add(ASN1IA5String("IA5String"))
_ = a2.add(ASN1.ONE)
_ = a2.add(ASN1ObjectIdentifier("1.2.3")!)
XCTAssertTrue(a1 != a2)
a2.add(ASN1UTCTime(date))
_ = a2.add(ASN1UTCTime(date))
XCTAssertTrue(a1 == a2)
}

func testSet() {
let date = Date()
let asn1set1 = ASN1Set()
asn1set1.add(ASN1IA5String("IA5String"))
asn1set1.add(ASN1.ONE)
asn1set1.add(ASN1ObjectIdentifier("1.2.3")!)
asn1set1.add(ASN1UTCTime(date))
_ = asn1set1.add(ASN1IA5String("IA5String"))
_ = asn1set1.add(ASN1.ONE)
_ = asn1set1.add(ASN1ObjectIdentifier("1.2.3")!)
_ = asn1set1.add(ASN1UTCTime(date))
let asn1set2 = ASN1Set()
asn1set2.add(ASN1UTCTime(date))
asn1set2.add(ASN1ObjectIdentifier("1.2.3")!)
asn1set2.add(ASN1.ONE)
_ = asn1set2.add(ASN1UTCTime(date))
_ = asn1set2.add(ASN1ObjectIdentifier("1.2.3")!)
_ = asn1set2.add(ASN1.ONE)
XCTAssertTrue(asn1set1 != asn1set2)
asn1set2.add(ASN1IA5String("IA5String"))
_ = asn1set2.add(ASN1IA5String("IA5String"))
XCTAssertTrue(asn1set1 == asn1set2)
}

func testRemoveSequence() {
let a1 = ASN1Sequence()
a1.add(ASN1IA5String("IA5String"))
a1.add(ASN1.ONE)
a1.add(ASN1ObjectIdentifier("1.2.3")!)
_ = a1.add(ASN1IA5String("IA5String"))
_ = a1.add(ASN1.ONE)
_ = a1.add(ASN1ObjectIdentifier("1.2.3")!)
let a2 = ASN1Sequence()
a2.add(ASN1.ONE)
a2.add(ASN1ObjectIdentifier("1.2.3")!)
_ = a2.add(ASN1.ONE)
_ = a2.add(ASN1ObjectIdentifier("1.2.3")!)
XCTAssertTrue(a1 != a2)
a1.remove(0)
XCTAssertTrue(a1 == a2)
}

func testRemoveSet() {
let a1 = ASN1Set()
a1.add(ASN1IA5String("IA5String"))
a1.add(ASN1.ONE)
a1.add(ASN1ObjectIdentifier("1.2.3")!)
_ = a1.add(ASN1IA5String("IA5String"))
_ = a1.add(ASN1.ONE)
_ = a1.add(ASN1ObjectIdentifier("1.2.3")!)
let a2 = ASN1Set()
a2.add(ASN1.ONE)
a2.add(ASN1ObjectIdentifier("1.2.3")!)
_ = a2.add(ASN1.ONE)
_ = a2.add(ASN1ObjectIdentifier("1.2.3")!)
XCTAssertTrue(a1 != a2)
a1.remove(2)
XCTAssertTrue(a1 == a2)
Expand Down
2 changes: 1 addition & 1 deletion Tests/ASN1Tests/PerformanceTest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class PerformanceTest: XCTestCase {
self.measure {
do {
for _ in 0 ..< N {
try ASN1.build(PerformanceTest.x)
_ = try ASN1.build(PerformanceTest.x)
}
} catch {
XCTFail("\(error)")
Expand Down
11 changes: 5 additions & 6 deletions docs/Classes.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,17 @@
<header>
<div class="content-wrapper">
<p><a href="index.html"> Docs</a> (100% documented)</p>
<p class="header-right">
<div class="header-right">
<form role="search" action="search.json">
<input type="text" placeholder="Search documentation" data-typeahead>
</form>
</p>
</div>
</div>
</header>
<div class="content-wrapper">
<p id="breadcrumbs">
<a href="index.html"> Reference</a>
<img id="carat" src="img/carat.png" />
<img id="carat" src="img/carat.png" alt=""/>
Classes Reference
</p>
</div>
Expand Down Expand Up @@ -695,11 +695,10 @@ <h4>Declaration</h4>
</section>
</section>
<section id="footer">
<p>&copy; 2021 <a class="link" href="" target="_blank" rel="external"></a>. All rights reserved. (Last updated: 2021-08-03)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.13.5</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
<p>&copy; 2022 <a class="link" href="" target="_blank" rel="external noopener"></a>. All rights reserved. (Last updated: 2022-02-17)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external noopener">jazzy ♪♫ v0.14.1</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external noopener">Realm</a> project.</p>
</section>
</article>
</div>
</body>
</div>
</html>
19 changes: 9 additions & 10 deletions docs/Classes/ASN1.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,17 @@
<header>
<div class="content-wrapper">
<p><a href="../index.html"> Docs</a> (100% documented)</p>
<p class="header-right">
<div class="header-right">
<form role="search" action="../search.json">
<input type="text" placeholder="Search documentation" data-typeahead>
</form>
</p>
</div>
</div>
</header>
<div class="content-wrapper">
<p id="breadcrumbs">
<a href="../index.html"> Reference</a>
<img id="carat" src="../img/carat.png" />
<img id="carat" src="../img/carat.png" alt=""/>
ASN1 Class Reference
</p>
</div>
Expand Down Expand Up @@ -142,7 +142,7 @@ <h1>ASN1</h1>
<a name="//apple_ref/swift/Section/Constants" class="dashAnchor"></a>
<div class="section-name-container">
<a class="section-name-link" href="#/Constants"></a>
<h3 class="section-name"><p>Constants</p>
<h3 class="section-name"><span>Constants</span>
</h3>
</div>
</div>
Expand Down Expand Up @@ -641,7 +641,7 @@ <h4>Declaration</h4>
<a name="//apple_ref/swift/Section/Stored properties" class="dashAnchor"></a>
<div class="section-name-container">
<a class="section-name-link" href="#/Stored%20properties"></a>
<h3 class="section-name"><p>Stored properties</p>
<h3 class="section-name"><span>Stored properties</span>
</h3>
</div>
</div>
Expand Down Expand Up @@ -681,7 +681,7 @@ <h4>Declaration</h4>
<a name="//apple_ref/swift/Section/Computed properties" class="dashAnchor"></a>
<div class="section-name-container">
<a class="section-name-link" href="#/Computed%20properties"></a>
<h3 class="section-name"><p>Computed properties</p>
<h3 class="section-name"><span>Computed properties</span>
</h3>
</div>
</div>
Expand Down Expand Up @@ -721,7 +721,7 @@ <h4>Declaration</h4>
<a name="//apple_ref/swift/Section/Functions" class="dashAnchor"></a>
<div class="section-name-container">
<a class="section-name-link" href="#/Functions"></a>
<h3 class="section-name"><p>Functions</p>
<h3 class="section-name"><span>Functions</span>
</h3>
</div>
</div>
Expand Down Expand Up @@ -934,11 +934,10 @@ <h4>Return Value</h4>
</section>
</section>
<section id="footer">
<p>&copy; 2021 <a class="link" href="" target="_blank" rel="external"></a>. All rights reserved. (Last updated: 2021-08-03)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.13.5</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
<p>&copy; 2022 <a class="link" href="" target="_blank" rel="external noopener"></a>. All rights reserved. (Last updated: 2022-02-17)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external noopener">jazzy ♪♫ v0.14.1</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external noopener">Realm</a> project.</p>
</section>
</article>
</div>
</body>
</div>
</html>
15 changes: 7 additions & 8 deletions docs/Classes/ASN1BMPString.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,17 @@
<header>
<div class="content-wrapper">
<p><a href="../index.html"> Docs</a> (100% documented)</p>
<p class="header-right">
<div class="header-right">
<form role="search" action="../search.json">
<input type="text" placeholder="Search documentation" data-typeahead>
</form>
</p>
</div>
</div>
</header>
<div class="content-wrapper">
<p id="breadcrumbs">
<a href="../index.html"> Reference</a>
<img id="carat" src="../img/carat.png" />
<img id="carat" src="../img/carat.png" alt=""/>
ASN1BMPString Class Reference
</p>
</div>
Expand Down Expand Up @@ -142,7 +142,7 @@ <h1>ASN1BMPString</h1>
<a name="//apple_ref/swift/Section/Initializers" class="dashAnchor"></a>
<div class="section-name-container">
<a class="section-name-link" href="#/Initializers"></a>
<h3 class="section-name"><p>Initializers</p>
<h3 class="section-name"><span>Initializers</span>
</h3>
</div>
</div>
Expand Down Expand Up @@ -247,7 +247,7 @@ <h4>Parameters</h4>
<a name="//apple_ref/swift/Section/Computed properties" class="dashAnchor"></a>
<div class="section-name-container">
<a class="section-name-link" href="#/Computed%20properties"></a>
<h3 class="section-name"><p>Computed properties</p>
<h3 class="section-name"><span>Computed properties</span>
</h3>
</div>
</div>
Expand Down Expand Up @@ -284,11 +284,10 @@ <h4>Declaration</h4>
</section>
</section>
<section id="footer">
<p>&copy; 2021 <a class="link" href="" target="_blank" rel="external"></a>. All rights reserved. (Last updated: 2021-08-03)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.13.5</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
<p>&copy; 2022 <a class="link" href="" target="_blank" rel="external noopener"></a>. All rights reserved. (Last updated: 2022-02-17)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external noopener">jazzy ♪♫ v0.14.1</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external noopener">Realm</a> project.</p>
</section>
</article>
</div>
</body>
</div>
</html>
17 changes: 8 additions & 9 deletions docs/Classes/ASN1BitString.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,17 @@
<header>
<div class="content-wrapper">
<p><a href="../index.html"> Docs</a> (100% documented)</p>
<p class="header-right">
<div class="header-right">
<form role="search" action="../search.json">
<input type="text" placeholder="Search documentation" data-typeahead>
</form>
</p>
</div>
</div>
</header>
<div class="content-wrapper">
<p id="breadcrumbs">
<a href="../index.html"> Reference</a>
<img id="carat" src="../img/carat.png" />
<img id="carat" src="../img/carat.png" alt=""/>
ASN1BitString Class Reference
</p>
</div>
Expand Down Expand Up @@ -142,7 +142,7 @@ <h1>ASN1BitString</h1>
<a name="//apple_ref/swift/Section/Initializers" class="dashAnchor"></a>
<div class="section-name-container">
<a class="section-name-link" href="#/Initializers"></a>
<h3 class="section-name"><p>Initializers</p>
<h3 class="section-name"><span>Initializers</span>
</h3>
</div>
</div>
Expand Down Expand Up @@ -218,7 +218,7 @@ <h4>Parameters</h4>
<a name="//apple_ref/swift/Section/Stored properties" class="dashAnchor"></a>
<div class="section-name-container">
<a class="section-name-link" href="#/Stored%20properties"></a>
<h3 class="section-name"><p>Stored properties</p>
<h3 class="section-name"><span>Stored properties</span>
</h3>
</div>
</div>
Expand Down Expand Up @@ -285,7 +285,7 @@ <h4>Declaration</h4>
<a name="//apple_ref/swift/Section/Computed properties" class="dashAnchor"></a>
<div class="section-name-container">
<a class="section-name-link" href="#/Computed%20properties"></a>
<h3 class="section-name"><p>Computed properties</p>
<h3 class="section-name"><span>Computed properties</span>
</h3>
</div>
</div>
Expand Down Expand Up @@ -322,11 +322,10 @@ <h4>Declaration</h4>
</section>
</section>
<section id="footer">
<p>&copy; 2021 <a class="link" href="" target="_blank" rel="external"></a>. All rights reserved. (Last updated: 2021-08-03)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.13.5</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
<p>&copy; 2022 <a class="link" href="" target="_blank" rel="external noopener"></a>. All rights reserved. (Last updated: 2022-02-17)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external noopener">jazzy ♪♫ v0.14.1</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external noopener">Realm</a> project.</p>
</section>
</article>
</div>
</body>
</div>
</html>
Loading

0 comments on commit 2149912

Please sign in to comment.