mirror of
https://github.com/vgough/encfs.git
synced 2025-08-12 07:09:12 +02:00
break out cipher primitives, add unit tests
git-svn-id: http://encfs.googlecode.com/svn/trunk@94 db9cf616-1c43-0410-9cb8-a902689de0d6
This commit is contained in:
28
cipher/BlockCipher.h
Normal file
28
cipher/BlockCipher.h
Normal file
@ -0,0 +1,28 @@
|
||||
#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 {
|
||||
|
||||
// BlockCipher is a StreamCipher with a block size.
|
||||
// Encryption and decryption must be in multiples of the block size.
|
||||
class BlockCipher : public StreamCipher
|
||||
{
|
||||
public:
|
||||
static Registry<BlockCipher>& GetRegistry();
|
||||
|
||||
BlockCipher();
|
||||
virtual ~BlockCipher();
|
||||
|
||||
virtual int blockSize() const =0;
|
||||
};
|
||||
|
||||
} // namespace encfs
|
||||
|
||||
#endif // BLOCKCIPHER_H
|
Reference in New Issue
Block a user