Skip to content

Commit cda46f3

Browse files
committed
fix(crypto): add missing public initializers
1 parent 9868745 commit cda46f3

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

Sources/PubNub/Helpers/Crypto/Cryptors/Cryptor.swift

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@ public struct EncryptedData {
1717
let metadata: Data
1818
/// Resulting encrypted `Data`
1919
let data: Data
20+
21+
public init(metadata: Data, data: Data) {
22+
self.metadata = metadata
23+
self.data = data
24+
}
2025
}
2126

2227
/// Represents the result of encrypted `InputStream`
@@ -27,6 +32,12 @@ public struct EncryptedStreamData {
2732
let contentLength: Int
2833
/// Metadata (if any) used while encrypting
2934
let metadata: Data
35+
36+
public init(stream: InputStream, contentLength: Int, metadata: Data) {
37+
self.stream = stream
38+
self.contentLength = contentLength
39+
self.metadata = metadata
40+
}
3041
}
3142

3243
/// Typealias for uniquely identifying applied encryption

0 commit comments

Comments
 (0)