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
EUDCC
Declaration
Swift
public init( issuer: String, issuedAt: Date, expiresAt: Date, schmemaVersion: String, dateOfBirth: Date, name: Name, content: Content, cryptographicSignature: CryptographicSignature, base45Representation: String )
Parameters
issuer
The issuer
issuedAt
The issued at Date
expiresAt
The expiry Date
schmemaVersion
The Schema version
dateOfBirth
The date of birth
name
The Name
content
The Content
cryptographicSignature
The CryptographicSignature
base45Representation
The The Base-45 representation
-
Creates a new instance by decoding from the given decoder.
Declaration
Swift
public init(from decoder: Decoder) throws
Parameters
decoder
The 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) throws
Parameters
encoder
The encoder to write data to.
-
The EUDCC CryptographicSignature
See moreDeclaration
Swift
struct CryptographicSignature : Codable, Hashable
-
The Vaccination case of the
Content
if availableDeclaration
Swift
var vaccination: Vaccination? { get }
-
Decode
EUDCC
from EUDCC String representationDeclaration
Swift
static func decode( from eudccStringRepresentation: String, using decoder: EUDCCDecoder = .init() ) -> Result<Self, EUDCCDecoder.DecodingError>
Parameters
eudccStringRepresentation
The EUDCC String representation
decoder
The
EUDCCDecoder
. Default value.init()
Return Value
A Result contains either the successfully decoded EUDCC or an DecodingError
-
Verify
EUDCC
using anEUDCCVerifier
Declaration
Swift
func verify( using verifier: EUDCCVerifier, completion: @escaping (EUDCCVerifier.VerificationResult) -> Void )
Parameters
verifier
The EUDCCVerifier
completion
The 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
EUDCC
using aValidationRule
Declaration
Swift
func validate( rule: EUDCC.ValidationRule = .default, using validator: EUDCCValidator = .init() ) -> EUDCCValidator.ValidationResult
Parameters
rule
The ValidationRule that hsould be used to value the EUDCC. Default value
.default
validator
The EUDCCValidator. Default value
.init()
Return Value
The ValidationResult