Skip to content

Latest commit

 

History

History
34 lines (23 loc) · 1.47 KB

README.md

File metadata and controls

34 lines (23 loc) · 1.47 KB

NZCP validator

Validates NZCP passes according to https://nzcp.covid19.health.nz.

Example

This is output from the example program in cli/:

Scan QR code> NZCP:/1/2KCEVIQEIVVWK6JNGEASNICZAEP2KALYDZSGSZB2O5SWEOTOPJRXALTDN53GSZBRHEXGQZLBNR2GQLTOPICRUYMBTIFAIGTUKBAAUYTWMOSGQQDDN5XHIZLYOSBHQJTIOR2HA4Z2F4XXO53XFZ3TGLTPOJTS6MRQGE4C6Y3SMVSGK3TUNFQWY4ZPOYYXQKTIOR2HA4Z2F4XW46TDOAXGG33WNFSDCOJONBSWC3DUNAXG46RPMNXW45DFPB2HGL3WGFTXMZLSONUW63TFGEXDALRQMR2HS4DFQJ2FMZLSNFTGSYLCNRSUG4TFMRSW45DJMFWG6UDVMJWGSY2DN53GSZCQMFZXG4LDOJSWIZLOORUWC3CTOVRGUZLDOSRWSZ3JOZSW4TTBNVSWISTBMNVWUZTBNVUWY6KOMFWWKZ2TOBQXE4TPO5RWI33CNIYTSNRQFUYDILJRGYDVAYFE6VGU4MCDGK7DHLLYWHVPUS2YIDJOA6Y524TD3AZRM263WTY2BE4DPKIF27WKF3UDNNVSVWRDYIYVJ65IRJJJ6Z25M2DO4YZLBHWFQGVQR5ZLIWEQJOZTS3IQ7JTNCFDX

Given name:     Jack
Family name:    Sparrow
Date of birth:  1960-04-16
Valid between:  2021-11-03 to 2031-11-03

Pass ID:     urn:uuid:60a4f54d-4e30-4332-be33-ad78b1eafa4b
Signing key: did:web:nzcp.covid19.health.nz#key-1
Signature:   0uB7HdcmPYMxZr27TxoJODepBdfsou6Da2sq2iPCMVT7qIpSn2ddZobuYysJ7FgasI9ytFiQS7M5bRD6ZtEUdw

Validation: FAIL
> Untrusted issuer: got 'did:web:nzcp.covid19.health.nz'
> Unknown public key: got 'did:web:nzcp.covid19.health.nz#key-1'

See example_test.go and tests for more examples.

License

Copyright (c) 2021 Jonathan Chow

This project is licensed under the terms of the MIT license. See LICENSE for the full license text.