unrarsrc  6.1.7
About: unrar extracts, views and tests the contents of archives created with the RAR archiver.
  Fossies Dox: unrarsrc-6.1.7.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

crypt.hpp File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  CryptData
 
struct  CryptData::KDF5CacheItem
 
struct  CryptData::KDF3CacheItem
 

Macros

#define SIZE_SALT50   16
 
#define SIZE_SALT30   8
 
#define SIZE_INITV   16
 
#define SIZE_PSWCHECK   8
 
#define SIZE_PSWCHECK_CSUM   4
 
#define CRYPT_BLOCK_SIZE   16
 
#define CRYPT_BLOCK_MASK   (CRYPT_BLOCK_SIZE-1)
 
#define CRYPT5_KDF_LG2_COUNT   15
 
#define CRYPT5_KDF_LG2_COUNT_MAX   24
 
#define CRYPT_VERSION   0
 

Enumerations

enum  CRYPT_METHOD {
  CRYPT_NONE , CRYPT_RAR13 , CRYPT_RAR15 , CRYPT_RAR20 ,
  CRYPT_RAR30 , CRYPT_RAR50
}
 

Functions

void GetRnd (byte *RndBuf, size_t BufSize)
 
void hmac_sha256 (const byte *Key, size_t KeyLength, const byte *Data, size_t DataLength, byte *ResDigest)
 
void pbkdf2 (const byte *pass, size_t pass_len, const byte *salt, size_t salt_len, byte *key, byte *Value1, byte *Value2, uint rounds)
 
void ConvertHashToMAC (HashValue *Value, byte *Key)
 

Macro Definition Documentation

◆ CRYPT5_KDF_LG2_COUNT

#define CRYPT5_KDF_LG2_COUNT   15

Definition at line 18 of file crypt.hpp.

◆ CRYPT5_KDF_LG2_COUNT_MAX

#define CRYPT5_KDF_LG2_COUNT_MAX   24

Definition at line 19 of file crypt.hpp.

◆ CRYPT_BLOCK_MASK

#define CRYPT_BLOCK_MASK   (CRYPT_BLOCK_SIZE-1)

Definition at line 16 of file crypt.hpp.

◆ CRYPT_BLOCK_SIZE

#define CRYPT_BLOCK_SIZE   16

Definition at line 15 of file crypt.hpp.

◆ CRYPT_VERSION

#define CRYPT_VERSION   0

Definition at line 20 of file crypt.hpp.

◆ SIZE_INITV

#define SIZE_INITV   16

Definition at line 11 of file crypt.hpp.

◆ SIZE_PSWCHECK

#define SIZE_PSWCHECK   8

Definition at line 12 of file crypt.hpp.

◆ SIZE_PSWCHECK_CSUM

#define SIZE_PSWCHECK_CSUM   4

Definition at line 13 of file crypt.hpp.

◆ SIZE_SALT30

#define SIZE_SALT30   8

Definition at line 10 of file crypt.hpp.

◆ SIZE_SALT50

#define SIZE_SALT50   16

Definition at line 9 of file crypt.hpp.

Enumeration Type Documentation

◆ CRYPT_METHOD

Enumerator
CRYPT_NONE 
CRYPT_RAR13 
CRYPT_RAR15 
CRYPT_RAR20 
CRYPT_RAR30 
CRYPT_RAR50 

Definition at line 5 of file crypt.hpp.

Function Documentation

◆ ConvertHashToMAC()

void ConvertHashToMAC ( HashValue Value,
byte Key 
)

◆ GetRnd()

void GetRnd ( byte RndBuf,
size_t  BufSize 
)

Definition at line 113 of file crypt.cpp.

References TimeRandomize(), and TRUE.

◆ hmac_sha256()

void hmac_sha256 ( const byte Key,
size_t  KeyLength,
const byte Data,
size_t  DataLength,
byte ResDigest 
)

◆ pbkdf2()

void pbkdf2 ( const byte pass,
size_t  pass_len,
const byte salt,
size_t  salt_len,
byte key,
byte Value1,
byte Value2,
uint  rounds 
)

Definition at line 85 of file crypt5.cpp.

References cleandata(), hmac_sha256(), K, Min, SHA256_DIGEST_SIZE, U1, and U2.

Referenced by CryptData::SetKey50().