CryptoKit TOTP Fails in Swift Package

I am trying to use the HMAC function in a swift package but it does not work it only works in standard view controller style packages.

let hash = HMAC<Insecure.SHA1>.authenticationCode(for: counterData, using: SymmetricKey(data: secret))

  • Maybe you have another HMAC in your module, no?

Add a Comment

Replies

This is odd. If you are unable to resolve this then I would recommend opening a TSI so we can get a look at the entire project.

Matt Eaton
DTS Engineering, CoreOS
meaton3@apple.com