/* * EME Base Class * (C) 1999-2008 Jack Lloyd * * Distributed under the terms of the Botan license */ #include namespace Botan { /* * Encode a message */ SecureVector EME::encode(const byte msg[], u32bit msg_len, u32bit key_bits, RandomNumberGenerator& rng) const { return pad(msg, msg_len, key_bits, rng); } /* * Encode a message */ SecureVector EME::encode(const MemoryRegion& msg, u32bit key_bits, RandomNumberGenerator& rng) const { return pad(msg, msg.size(), key_bits, rng); } /* * Decode a message */ SecureVector EME::decode(const byte msg[], u32bit msg_len, u32bit key_bits) const { return unpad(msg, msg_len, key_bits); } /* * Decode a message */ SecureVector EME::decode(const MemoryRegion& msg, u32bit key_bits) const { return unpad(msg, msg.size(), key_bits); } }