Cryptographic nonce creation and verification for auth protocols.
A nonce is base64(random_16_bytes || HMAC(random_16_bytes)).
Summary
Functions
Create a cryptographic nonce derived from the wallet.
Verify that a nonce was derived from the given wallet.
Functions
@spec create(BSV.Wallet.ProtoWallet.t(), BSV.Wallet.Types.Counterparty.t()) :: {:ok, String.t()} | {:error, String.t()}
Create a cryptographic nonce derived from the wallet.
@spec verify( String.t(), BSV.Wallet.ProtoWallet.t(), BSV.Wallet.Types.Counterparty.t() ) :: {:ok, boolean()} | {:error, String.t()}
Verify that a nonce was derived from the given wallet.