chickadee » tweetnacl » symmetric-verify

k sm #!optional mprocedure

Decrypt and verify a message sm using the shared key k. The signature message combination sm and the returned plaintext are represented as strings. If the authenticity of the message cannot be verified the procedure returns #f instead of a string. If m is given and not #f it must be a string containing the plaintext of the message and sm is expected to only contain the message authentication tag in that case.