encfs/cipher/BlockCipher.h
Valient Gough a89752dfe7 reformat with clang-format -style=Google
git-svn-id: http://encfs.googlecode.com/svn/trunk@121 db9cf616-1c43-0410-9cb8-a902689de0d6
2013-10-19 22:35:26 +00:00

33 lines
774 B
C++

#ifndef BLOCKCIPHER_H
#define BLOCKCIPHER_H
#include "base/Interface.h"
#include "base/Range.h"
#include "base/Registry.h"
#include "base/shared_ptr.h"
#include "base/types.h"
#include "cipher/StreamCipher.h"
namespace encfs {
static const char NAME_AES_CBC[] = "AES/CBC";
static const char NAME_BLOWFISH_CBC[] = "Blowfish/CBC";
// BlockCipher is a StreamCipher with a block size.
// Encryption and decryption must be in multiples of the block size.
class BlockCipher : public StreamCipher {
public:
DECLARE_REGISTERABLE_TYPE(BlockCipher);
BlockCipher();
virtual ~BlockCipher();
// Not valid until a key has been set, as they key size may determine the
// block size.
virtual int blockSize() const = 0;
};
} // namespace encfs
#endif // BLOCKCIPHER_H