Package verification provides verification utilities.

    This is provided as reference to application authors wishing to calculate the exposure key HMAC as part of their exposure notifications mobile app.

    This protocol is detailed at

    Although exported, this package is non intended for general consumption. It is a shared dependency between multiple exposure notifications projects. We cannot guarantee that there won't be breaking changes in the future.



    This section is empty.


    This section is empty.


    func CalculateAllAllowedExposureKeyHMAC

    func CalculateAllAllowedExposureKeyHMAC(keys []verifyapi.ExposureKey, secret []byte) ([][]byte, error)

      CalculateAllAllowedExposureKeyHMAC calculates the main HMAC and the optional HMAC. The optional HMAC is only valid if the transmission risks are all zero.

      func CalculateExposureKeyHMAC

      func CalculateExposureKeyHMAC(keys []verifyapi.ExposureKey, secret []byte) ([]byte, error)

        CalculateExposureKeyHMAC will calculate the verification protocol HMAC value. Input keys are already to be base64 encoded. They will be sorted if necessary.

        func CalculateExpsureKeyHMACv1Alpha1

        func CalculateExpsureKeyHMACv1Alpha1(legacyKeys []v1alpha1.ExposureKey, secret []byte) ([]byte, error)

          CalculateExpsureKeyHMACv1Alpha1 is a convenience method for anyone still on v1alpha1. Deprecated: use CalculateExposureKeyHMAC instead Preserved for clients on v1alpha1, will be removed in v0.3 release.


          This section is empty.

          Source Files