~ubuntu-branches/ubuntu/wily/unrar-nonfree/wily-proposed

« back to all changes in this revision

Viewing changes to crypt.hpp

  • Committer: Package Import Robot
  • Author(s): Nick Andrik
  • Date: 2013-01-21 23:07:40 UTC
  • mfrom: (1.2.13)
  • Revision ID: package-import@ubuntu.com-20130121230740-yky1izwyj5x16wq1
Tags: 1:4.2.4-0.1
* Non-maintainer upload

* New upstream release (Closes: #687839)

* Add shared library binary and headers packages
  - Add entries into control file
  - Add libunrar0.{install,link,symbols} files
  - Add libunrar0-dev.install file
  - Patch missing binary object targets for library building
    (fix_missing_symbols)
  - Rename previous unrar-nonfree.{1,dirs,install,prerm,postint} file to
    unrar.* ones
  - Make sure libunrar.so is built (Closes: #485492, LP: #390263)
* Converted package to CDBS:
  - Simplified rules file
  - Added cdbs build-deps
* Added hardening support (Closes: #694611)
  - Updated compatibility version to 9
  - Added versioned dpkg-dev build-dep
* Updated copyright information:
  - Machine-readable format
  - Added missing files/licenses
* General maintentance:
  - Moved the homepage field in cortol file to the appropriate place
  - Bumped standards version to 3.9.4
  - Remove versioned conflict dependency

Show diffs side-by-side

added added

removed removed

Lines of Context:
9
9
#ifndef _SFX_RTL_
10
10
  CryptKeyCacheItem()
11
11
  {
12
 
    *Password=0;
 
12
    Password.Set(L"");
13
13
  }
14
14
 
15
15
  ~CryptKeyCacheItem()
16
16
  {
17
17
    memset(AESKey,0,sizeof(AESKey));
18
18
    memset(AESInit,0,sizeof(AESInit));
19
 
    memset(Password,0,sizeof(Password));
 
19
    memset(&Password,0,sizeof(Password));
20
20
  }
21
21
#endif
22
22
  byte AESKey[16],AESInit[16];
23
 
  wchar Password[MAXPASSWORD];
 
23
  SecPassword Password;
24
24
  bool SaltPresent;
25
25
  byte Salt[SALT_SIZE];
26
26
  bool HandsOffHash;
48
48
    static CryptKeyCacheItem Cache[4];
49
49
    static int CachePos;
50
50
  public:
51
 
    void SetCryptKeys(const wchar *Password,const byte *Salt,bool Encrypt,bool OldOnly,bool HandsOffHash);
 
51
    void SetCryptKeys(SecPassword *Password,const byte *Salt,bool Encrypt,bool OldOnly,bool HandsOffHash);
52
52
    void SetAV15Encryption();
53
53
    void SetCmt13Encryption();
54
54
    void EncryptBlock20(byte *Buf);