mirror of
https://github.com/vgough/encfs.git
synced 2025-06-23 21:41:46 +02:00
reformat file
git-svn-id: http://encfs.googlecode.com/svn/trunk@84 db9cf616-1c43-0410-9cb8-a902689de0d6
This commit is contained in:
parent
f144de359f
commit
183dca787f
@ -42,8 +42,8 @@ class Cipher
|
||||
public:
|
||||
// if no key length was indicated when cipher was registered, then keyLen
|
||||
// <= 0 will be used.
|
||||
typedef boost::shared_ptr<Cipher> (*CipherConstructor)( const Interface &iface,
|
||||
int keyLenBits );
|
||||
typedef boost::shared_ptr<Cipher> (*CipherConstructor)(
|
||||
const Interface &iface, int keyLenBits );
|
||||
|
||||
struct CipherAlgorithm
|
||||
{
|
||||
@ -70,6 +70,7 @@ public:
|
||||
const Interface &iface,
|
||||
CipherConstructor constructor,
|
||||
bool hidden = false);
|
||||
|
||||
static bool Register(const char *cipherName,
|
||||
const char *description,
|
||||
const Interface &iface,
|
||||
@ -77,7 +78,6 @@ public:
|
||||
CipherConstructor constructor,
|
||||
bool hidden = false);
|
||||
|
||||
|
||||
Cipher();
|
||||
virtual ~Cipher();
|
||||
|
||||
@ -91,8 +91,10 @@ public:
|
||||
virtual CipherKey newKey(const char *password, int passwdLength,
|
||||
int &iterationCount, long desiredFunctionDuration,
|
||||
const unsigned char *salt, int saltLen) =0;
|
||||
|
||||
// deprecated - for backward compatibility
|
||||
virtual CipherKey newKey(const char *password, int passwdLength ) =0;
|
||||
|
||||
// create a new random key
|
||||
virtual CipherKey newRandomKey() =0;
|
||||
|
||||
@ -100,6 +102,7 @@ public:
|
||||
virtual CipherKey readKey(const unsigned char *data,
|
||||
const CipherKey &encodingKey,
|
||||
bool checkKey = true) =0;
|
||||
|
||||
virtual void writeKey(const CipherKey &key, unsigned char *data,
|
||||
const CipherKey &encodingKey) =0;
|
||||
|
||||
@ -124,6 +127,7 @@ public:
|
||||
// 64 bit MAC of the data with the given key
|
||||
virtual uint64_t MAC_64( const unsigned char *src, int len,
|
||||
const CipherKey &key, uint64_t *chainedIV = 0 ) const =0;
|
||||
|
||||
// based on reductions of MAC_64
|
||||
unsigned int MAC_32( const unsigned char *src, int len,
|
||||
const CipherKey &key, uint64_t *chainedIV = 0 ) const;
|
||||
@ -160,6 +164,5 @@ public:
|
||||
uint64_t iv64, const CipherKey &key) const=0;
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user