You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
656 B
28 lines
656 B
/** |
|
* @file encrypt.h |
|
* |
|
* Interface of functions for compression and decompressing MPQ data. |
|
*/ |
|
#pragma once |
|
|
|
#include <cstdint> |
|
|
|
#include "utils/stdcompat/cstddef.hpp" |
|
|
|
namespace devilution { |
|
|
|
struct TDataInfo { |
|
byte *srcData; |
|
uint32_t srcOffset; |
|
byte *destData; |
|
uint32_t destOffset; |
|
uint32_t size; |
|
}; |
|
|
|
void Decrypt(uint32_t *castBlock, uint32_t size, uint32_t key); |
|
void Encrypt(uint32_t *castBlock, uint32_t size, uint32_t key); |
|
uint32_t Hash(const char *s, int type); |
|
uint32_t PkwareCompress(byte *srcData, uint32_t size); |
|
void PkwareDecompress(byte *inBuff, int recvSize, int maxBytes); |
|
|
|
} // namespace devilution
|
|
|