Data

public extension Data
extension Data: EntropyGenerator
  • Generate secure random bytes from Data

    Declaration

    Swift

    static func randomBytes(_ count: Int) throws -> Data
  • Create a Data object from a hex string

    Declaration

    Swift

    init(hexString: String) throws
  • Declaration

    Swift

    func bytes() -> [UInt8]
  • Declaration

    Swift

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