chromium/third_party/unrar/src/crypt.hpp

#ifndef _RAR_CRYPT_
#define _RAR_CRYPT_


enum CRYPT_METHOD {};

#define SIZE_SALT50
#define SIZE_SALT30
#define SIZE_INITV
#define SIZE_PSWCHECK
#define SIZE_PSWCHECK_CSUM

#define CRYPT_BLOCK_SIZE
#define CRYPT_BLOCK_MASK

#define CRYPT5_KDF_LG2_COUNT
#define CRYPT5_KDF_LG2_COUNT_MAX
#define CRYPT_VERSION


class CryptData
{};


class CheckPassword
{};

class RarCheckPassword:public CheckPassword
{};

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);

#endif