Encrypt the data in "plaintext" using the ciphername, key, and initial vector, returning the encrypted data in "encrypted" and a tag value in "tag" to be used to ensure that the ciphertext and AAD are not tampered with in transit.
crypto_evp_encrypt_auth( ciphername, key, iv, aad, plaintext, encrypted var, tag var )
Returns 1 on success, 0 on failure
  • ciphername = Name of cipher to use. An example is "aes-256-gcm"
  • key = Key value
  • iv = Initial vector
  • aad = Additional authenticated data
  • plaintext = Plaintext to encrypt
  • encrypted = Resulting encrypted value
  • tag = tag value
User Annotations: crypto_evp_encrypt_auth