Skip to content

Commit

Permalink
Add initializer to NanoTDF class
Browse files Browse the repository at this point in the history
An initializer has been added to the NanoTDF class in the OpenTDFKit. This allows instantiating a new NanoTDF object with a resource locator, a public key, and a curve as parameters.
  • Loading branch information
arkavo-com committed Jul 3, 2024
1 parent e584c98 commit ce75256
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions OpenTDFKit/NanoTDF.swift
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,11 @@ public struct KasMetadata {
public let resourceLocator: ResourceLocator
public let publicKey: Any
public let curve: Curve
public init(resourceLocator: ResourceLocator, publicKey: Any, curve: Curve) {
self.resourceLocator = resourceLocator
self.publicKey = publicKey
self.curve = curve
}
}

public func createNanoTDF(kas: KasMetadata, policy: inout Policy, plaintext: Data) throws -> NanoTDF {
Expand Down

0 comments on commit ce75256

Please sign in to comment.