EUDCC
public struct EUDCC : Hashable
extension EUDCC: Decodable
extension EUDCC: Encodable
The European Digital COVID Certificate (EUCC)
-
The issuer
Declaration
Swift
public let issuer: String -
The issued at Date
Declaration
Swift
public let issuedAt: Date -
The expiry Date
Declaration
Swift
public let expiresAt: Date -
The Schema version
Declaration
Swift
public let schmemaVersion: String -
The date of birth
Declaration
Swift
public let dateOfBirth: Date -
The Name
Declaration
Swift
public let name: Name -
The Content
Declaration
Swift
public let content: Content -
The CryptographicSignature
Declaration
Swift
public let cryptographicSignature: CryptographicSignature -
The Base-45 representation
Declaration
Swift
public let base45Representation: String
-
init(issuer:issuedAt: expiresAt: schmemaVersion: dateOfBirth: name: content: cryptographicSignature: base45Representation: ) Creates a new instance of
EUDCCDeclaration
Swift
public init( issuer: String, issuedAt: Date, expiresAt: Date, schmemaVersion: String, dateOfBirth: Date, name: Name, content: Content, cryptographicSignature: CryptographicSignature, base45Representation: String )Parameters
issuerThe issuer
issuedAtThe issued at Date
expiresAtThe expiry Date
schmemaVersionThe Schema version
dateOfBirthThe date of birth
nameThe Name
contentThe Content
cryptographicSignatureThe CryptographicSignature
base45RepresentationThe The Base-45 representation
-
Creates a new instance by decoding from the given decoder.
Declaration
Swift
public init(from decoder: Decoder) throwsParameters
decoderThe decoder to read data from.
-
The EUDCC Encoder UserInfo Keys
Declaration
Swift
enum EncoderUserInfoKeys
-
Encodes this value into the given encoder.
Declaration
Swift
public func encode(to encoder: Encoder) throwsParameters
encoderThe encoder to write data to.
-
The EUDCC CryptographicSignature
See moreDeclaration
Swift
struct CryptographicSignature : Codable, Hashable
-
The Vaccination case of the
Contentif availableDeclaration
Swift
var vaccination: Vaccination? { get }
-
Decode
EUDCCfrom EUDCC String representationDeclaration
Swift
static func decode( from eudccStringRepresentation: String, using decoder: EUDCCDecoder = .init() ) -> Result<Self, EUDCCDecoder.DecodingError>Parameters
eudccStringRepresentationThe EUDCC String representation
decoderThe
EUDCCDecoder. Default value.init()Return Value
A Result contains either the successfully decoded EUDCC or an DecodingError
-
Verify
EUDCCusing anEUDCCVerifierDeclaration
Swift
func verify( using verifier: EUDCCVerifier, completion: @escaping (EUDCCVerifier.VerificationResult) -> Void )Parameters
verifierThe EUDCCVerifier
completionThe verification completion closure
-
The EUDCC SignedPayload
See moreDeclaration
Swift
struct SignedPayload : Codable, Hashable
-
An EUDCC TrustCertificate
See moreDeclaration
Swift
struct TrustCertificate : Codable, Hashable
-
An EUDCC Verification Candidate
See moreDeclaration
Swift
struct VerificationCandidate : Hashable
-
Valide
EUDCCusing aValidationRuleDeclaration
Swift
func validate( rule: EUDCC.ValidationRule = .default, using validator: EUDCCValidator = .init() ) -> EUDCCValidator.ValidationResultParameters
ruleThe ValidationRule that hsould be used to value the EUDCC. Default value
.defaultvalidatorThe EUDCCValidator. Default value
.init()Return Value
The ValidationResult
EUDCC Structure Reference