b8be0b2013-12-19Martin Nilsson #pike __REAL_VERSION__ #pragma strict_types
412d8e2013-12-07Henrik Grubbström (Grubba) //! Base class for AEAD (Authenticated Encryption with Associated Data) //! algorithms. //! //! AEAD algorithms behave like a combination of a @[Cipher] and //! a HMAC. //! //! Note that no actual AEAD algorithm is implemented //! in the base class. They are implemented in classes //! that inherit this class.
41a0e52016-04-15Henrik Grubbström (Grubba) //! //! @seealso //! @[AE]
412d8e2013-12-07Henrik Grubbström (Grubba) 
41a0e52016-04-15Henrik Grubbström (Grubba) inherit __builtin.Nettle.AE;
412d8e2013-12-07Henrik Grubbström (Grubba) 
2e69f72014-04-20Henrik Grubbström (Grubba) inherit __builtin.Nettle.__Hash;
412d8e2013-12-07Henrik Grubbström (Grubba)  //! This is the context for a single incrementally updated AEAD cipher. //! //! Most of the functions here are only prototypes, and need to //! be overrided via inherit. class State { inherit Cipher::State;
2e69f72014-04-20Henrik Grubbström (Grubba)  inherit __Hash::State;
412d8e2013-12-07Henrik Grubbström (Grubba) 
ef84602014-04-26Henrik Grubbström (Grubba)  protected void create()
412d8e2013-12-07Henrik Grubbström (Grubba)  {
2e69f72014-04-20Henrik Grubbström (Grubba)  /* Needed to block the default implementation in __Hash.State. */
412d8e2013-12-07Henrik Grubbström (Grubba)  } } //! Calling `() will return a @[State] object.
ef84602014-04-26Henrik Grubbström (Grubba) State `()() { return State();
412d8e2013-12-07Henrik Grubbström (Grubba) }