From 1e097cca2844cf509937eafa88e4b37f703c4e7e Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sat, 16 Nov 2013 14:29:31 +0000 Subject: StdCrypt: - stronger randomizer; - ability to validate passwords; - anti-brutforce key encryption git-svn-id: http://svn.miranda-ng.org/main/trunk@6919 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- src/core/stdcrypt/stdcrypt.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/core/stdcrypt/stdcrypt.h') diff --git a/src/core/stdcrypt/stdcrypt.h b/src/core/stdcrypt/stdcrypt.h index f685152461..c9a3a72315 100644 --- a/src/core/stdcrypt/stdcrypt.h +++ b/src/core/stdcrypt/stdcrypt.h @@ -31,7 +31,7 @@ struct CStdCrypt : public MICryptoEngine, public MZeroedObject BOOL m_valid; CMStringA m_password; - char m_key[KEY_LENGTH]; + BYTE m_key[KEY_LENGTH]; CRijndael m_aes; STDMETHODIMP_(void) destroy(); @@ -39,9 +39,9 @@ struct CStdCrypt : public MICryptoEngine, public MZeroedObject // get/set the instance key STDMETHODIMP_(size_t) getKeyLength(void); STDMETHODIMP_(bool) getKey(BYTE *pKey, size_t cbKeyLen); - STDMETHODIMP_(int) setKey(const BYTE *pKey, size_t cbKeyLen); + STDMETHODIMP_(bool) setKey(const BYTE *pKey, size_t cbKeyLen); - STDMETHODIMP_(void) generateKey(void); // creates a new key inside + STDMETHODIMP_(bool) generateKey(void); // creates a new key inside STDMETHODIMP_(void) purgeKey(void); // purges a key from memory // sets the master password (in utf-8) -- cgit v1.2.3