EntropyGenerator

public protocol EntropyGenerator

Adopters can generate entropy; a random set of bytes.

  • Declaration

    Swift

    func entropy() -> Result<Data, Error>

Available where Self: StringProtocol

  • entropy() Default implementation

    Default Implementation

    Interprets self as a string of pre-computed entropy, at least if its of even length, and between 32 & 64 characters.

    E.g., “7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f”.

    Declaration

    Swift

    public func entropy() -> Result<Data, Error>