MCPcopy Create free account
hub / github.com/abbeycode/UnrarKit / DecryptBlock

Method DecryptBlock

Libraries/unrar/crypt.cpp:31–52  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

29
30
31void CryptData::DecryptBlock(byte *Buf,size_t Size)
32{
33 switch(Method)
34 {
35#ifndef SFX_MODULE
36 case CRYPT_RAR13:
37 Decrypt13(Buf,Size);
38 break;
39 case CRYPT_RAR15:
40 Crypt15(Buf,Size);
41 break;
42 case CRYPT_RAR20:
43 for (size_t I=0;I<Size;I+=CRYPT_BLOCK_SIZE)
44 DecryptBlock20(Buf+I);
45 break;
46#endif
47 case CRYPT_RAR30:
48 case CRYPT_RAR50:
49 rin.blockDecrypt(Buf,Size,Buf);
50 break;
51 }
52}
53
54
55bool CryptData::SetCryptKeys(bool Encrypt,CRYPT_METHOD Method,

Callers 3

UnpReadMethod · 0.80
ReadMethod · 0.80
ReadBufferMethod · 0.80

Calls 1

blockDecryptMethod · 0.80

Tested by

no test coverage detected