Skip to content

Commit

Permalink
fix(crypto): add missing public initializers
Browse files Browse the repository at this point in the history
  • Loading branch information
parfeon committed Jul 21, 2024
1 parent 9868745 commit cda46f3
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions Sources/PubNub/Helpers/Crypto/Cryptors/Cryptor.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ public struct EncryptedData {
let metadata: Data
/// Resulting encrypted `Data`
let data: Data

public init(metadata: Data, data: Data) {
self.metadata = metadata
self.data = data
}
}

/// Represents the result of encrypted `InputStream`
Expand All @@ -27,6 +32,12 @@ public struct EncryptedStreamData {
let contentLength: Int
/// Metadata (if any) used while encrypting
let metadata: Data

public init(stream: InputStream, contentLength: Int, metadata: Data) {
self.stream = stream
self.contentLength = contentLength
self.metadata = metadata
}
}

/// Typealias for uniquely identifying applied encryption
Expand Down

0 comments on commit cda46f3

Please sign in to comment.