anchor.diff:      ?COMPAT(
          case Data of
              {AAD, CryptoText, Tag} ->
  -               aead_decrypt(alias(Type,Key), Key, Ivec, AAD, CryptoText, Tag);
  +               crypto_aead(alias(Type,Key), Key, Ivec, CryptoText, AAD, Tag, false);
              CryptoText ->
  -               crypto_one_shot(alias(Type,Key), Key, Ivec, CryptoText, false)
  +               crypto_one_time(alias(Type,Key), Key, Ivec, CryptoText, false)
          end).
   
   
  --spec block_decrypt(Type::block_cipher_no_iv(), Key::key(), Data::iodata()) ->
  +-spec block_decrypt(Type::block_cipher_without_iv(), Key::key(), Data::iodata()) ->
                              binary() | run_time_error().
   
   block_decrypt(Type, Key0, CryptoText) ->
       Key = iolist_to_binary(Key0),
  -    ?COMPAT(crypto_one_shot(alias(Type,Key), Key, <<>>, CryptoText, false)).
  +    ?COMPAT(crypto_one_time(alias(Type,Key), Key, CryptoText, false)).
   
   %%%-------- Stream ciphers API
   
  
positive.code:     ?COMPAT(
         case Data of
             {AAD, PlainText} ->
                 aead_encrypt(alias(Type,Key), Key, Ivec, AAD, PlainText, aead_tag_len(Type));
             {AAD, PlainText, TagLength} ->
                 aead_encrypt(alias(Type,Key), Key, Ivec, AAD, PlainText, TagLength);
             PlainText ->
                 crypto_one_shot(alias(Type,Key), Key, Ivec, PlainText, true)
         end).
  
  -spec block_encrypt(Type::block_cipher_no_iv(), Key::key(), PlainText::iodata()) ->
                             binary() | run_time_error().
  
  block_encrypt(Type, Key0, PlainText) ->
      Key = iolist_to_binary(Key0),
      ?COMPAT(crypto_one_shot(alias(Type,Key), Key, <<>>, PlainText, true)).
  
  
  aead_tag_len(chacha20_poly1305) -> 16;
  aead_tag_len(aes_ccm) -> 12;
  aead_tag_len(aes_128_ccm) -> 12;
  aead_tag_len(aes_192_ccm) -> 12;
  aead_tag_len(aes_256_ccm) -> 12;
  aead_tag_len(aes_gcm) -> 16;
  aead_tag_len(aes_128_gcm) -> 16;
  aead_tag_len(aes_192_gcm) -> 16;
  aead_tag_len(aes_256_gcm) -> 16.
  
  %%%----------------------------------------------------------------
  %%%----------------------------------------------------------------
  -spec block_decrypt(Type::block_cipher_iv(), Key::key()|des3_key(), Ivec::binary(), Data::iodata()) ->
                             binary() | run_time_error();
  		   (Type::aead_cipher(), Key::iodata(), Ivec::binary(),
  		    {AAD::binary(), Data::iodata(), Tag::binary()}) ->
  
negative.code: -define(COMPAT(CALL),
          try begin CALL end
          catch
              error:{error, {_File,_Line}, _Reason} ->
                  error(badarg);
              error:{E, {_File,_Line}, _Reason} when E==notsup ; E==badarg ->
                  error(E)
          end).
  
  