EUDCCDecoder

public struct EUDCCDecoder

A EUDCC Decoder

Initializer

  • Creates a new instance of EUDCCDecoder

    Declaration

    Swift

    public init(
        eudccPrefix: String = "HC1:",
        eudccJSONDecoder: JSONDecoder = .init()
    )

    Parameters

    eudccPrefix

    The EUDCC Prefix. Default value HC1:

    eudccJSONDecoder

    The EUDCC JSONDecoder. Default value .init()

DecodingError

Decode

  • Decode EUDCC from EUDCC Base-45 encoded Data

    Declaration

    Swift

    func decode(
        from base45EncodedData: Data
    ) -> Result<EUDCC, DecodingError>

    Parameters

    base45EncodedData

    The EUDCC Base-45 encoded Data

    Return Value

    A Result contains either the successfully decoded EUDCC or an DecodingError

  • Decode EUDCC from EUDCC Base-45 encoded String

    Declaration

    Swift

    func decode(
        from base45EncodedString: String
    ) -> Result<EUDCC, DecodingError>

    Parameters

    base45EncodedString

    The EUDCC Base-45 encoded String

    Return Value

    A Result contains either the successfully decoded EUDCC or an DecodingError