Bytes

public struct Bytes
  • Encode a Data to RSTaggedData with a tag of WellKnownTags.bytes

    Declaration

    Swift

    public static func encode(_ value: Data) -> RSTaggedData

    Parameters

    value

    the Data value to encode

    Return Value

    An RSTaggedData object with the encoded data

  • Decode an RSTaggedData tagged with WellKnownTags.bytes to a Data

    Declaration

    Swift

    public static func decode(_ value: RSTaggedData) -> Data?

    Parameters

    value

    RSTaggedData contianing data tagged with WellKnownTags.bytes

    Return Value

    The decoded Data or nil if an error is encountered in the decoding process