1 #ifndef ENCRYPTION_WRAPPER_CLASS
2 #define ENCRYPTION_WRAPPER_CLASS
57 virtual clonable *
clone()
const;
Provides a dynamically resizable ASCII character string.
Defines the base class for all string processing objects in hoople.
virtual base_string & assign(const base_string &s)=0
Sets the contents of this string to "s".
A very common template for a dynamic array of bytes.
static const byte_array & empty_array()
Outcomes describe the state of completion for an operation.
virtual const char * class_name() const =0
Returns the bare name of this class as a constant character pointer.
Wraps an encrypted infoton when the octopus is in an encrypted mode.
void text_form(basis::base_string &fill) const
requires derived infotons to be able to show their state as a string.
virtual clonable * clone() const
must be provided to allow creation of a copy of this object.
DEFINE_CLASS_NAME("encryption_wrapper")
encryption_wrapper & operator=(const encryption_wrapper &to_copy)
virtual bool unpack(basis::byte_array &packed_form)
restores an infoton from a packed form.
static const structures::string_array & encryption_classifier()
returns the classifier for this type of infoton.
encryption_wrapper(const basis::byte_array &wrapped=basis::byte_array::empty_array())
virtual int packed_size() const
reports how large the infoton will be when packed.
basis::byte_array _wrapped
the encrypted data that's held here.
virtual ~encryption_wrapper()
virtual void pack(basis::byte_array &packed_form) const
stuffs the data in the infoton into the "packed_form".
An infoton is an individual request parcel with accompanying information.
Identifies requests made on an octopus by users.
provides prefab implementations for parts of the tentacle object.
this simple tentacle just unpacks the encryption_wrapper infoton.
virtual basis::outcome consume(infoton &to_chow, const octopus_request_id &item_id, basis::byte_array &transformed)
this should never be called.
virtual ~unwrapping_tentacle()
virtual basis::outcome reconstitute(const structures::string_array &classifier, basis::byte_array &packed_form, infoton *&reformed)
this is a simple enough action that it is totally automated.
DEFINE_CLASS_NAME("unwrapping_tentacle")
An array of strings with some additional helpful methods.
Automates some common tasks for tentacle implementations. This template provides some default impleme...