Secret

public class Secret

Undocumented

  • The number of secret shares to create (N)

    Declaration

    Swift

    public let shares: UInt8
  • The number of secret shares requried to reconstruct the secret

    Declaration

    Swift

    public let threshold: UInt8
  • The secret data

    Declaration

    Swift

    public let data: Data
  • Secret Sharing Errors

    See more

    Declaration

    Swift

    public enum Errors : Error
  • An Invidivual Secret Share

    See more

    Declaration

    Swift

    public struct Share : CustomStringConvertible, Hashable
  • Initialize a secret data with a threshold and the number of shares to create.

    Declaration

    Swift

    public init(data: Data, threshold: Int, shares: Int) throws
  • Split the secret data into shares shares

    Declaration

    Swift

    public func split() throws -> [Share]
  • Combine shares to reconstruct a secret data

    Declaration

    Swift

    public static func combine(shares: [Share]) throws -> Data