Commit fbbe0039 authored by Andrew Talbot's avatar Andrew Talbot Committed by Alexandre Julliard

crypt32: Constify some variables.

parent ce87522f
...@@ -111,7 +111,7 @@ static const char crypt_magic_str[] = "Wine Crypt32 ok"; ...@@ -111,7 +111,7 @@ static const char crypt_magic_str[] = "Wine Crypt32 ok";
/* debugging tool to print strings of hex chars */ /* debugging tool to print strings of hex chars */
static const char * static const char *
hex_str(unsigned char *p, int n) hex_str(const unsigned char *p, int n)
{ {
const char * ptr; const char * ptr;
char report[80]; char report[80];
...@@ -146,7 +146,7 @@ void serialize_dword(DWORD value,BYTE ** ptr) ...@@ -146,7 +146,7 @@ void serialize_dword(DWORD value,BYTE ** ptr)
} }
static static
void serialize_string(BYTE * str,BYTE ** ptr,DWORD len, DWORD width, void serialize_string(const BYTE *str, BYTE **ptr, DWORD len, DWORD width,
BOOL prepend_len) BOOL prepend_len)
{ {
/*TRACE("called %ux%u\n",(unsigned int)len,(unsigned int)width);*/ /*TRACE("called %ux%u\n",(unsigned int)len,(unsigned int)width);*/
...@@ -160,7 +160,7 @@ void serialize_string(BYTE * str,BYTE ** ptr,DWORD len, DWORD width, ...@@ -160,7 +160,7 @@ void serialize_string(BYTE * str,BYTE ** ptr,DWORD len, DWORD width,
} }
static static
BOOL unserialize_dword(BYTE * ptr, DWORD *index, DWORD size, DWORD * value) BOOL unserialize_dword(const BYTE *ptr, DWORD *index, DWORD size, DWORD *value)
{ {
/*TRACE("called\n");*/ /*TRACE("called\n");*/
...@@ -178,7 +178,7 @@ BOOL unserialize_dword(BYTE * ptr, DWORD *index, DWORD size, DWORD * value) ...@@ -178,7 +178,7 @@ BOOL unserialize_dword(BYTE * ptr, DWORD *index, DWORD size, DWORD * value)
} }
static static
BOOL unserialize_string(BYTE * ptr, DWORD *index, DWORD size, BOOL unserialize_string(const BYTE *ptr, DWORD *index, DWORD size,
DWORD len, DWORD width, BOOL inline_len, DWORD len, DWORD width, BOOL inline_len,
BYTE ** data, DWORD * stored) BYTE ** data, DWORD * stored)
{ {
...@@ -212,7 +212,7 @@ BOOL unserialize_string(BYTE * ptr, DWORD *index, DWORD size, ...@@ -212,7 +212,7 @@ BOOL unserialize_string(BYTE * ptr, DWORD *index, DWORD size,
} }
static static
BOOL serialize(struct protect_data_t * pInfo, DATA_BLOB * pSerial) BOOL serialize(const struct protect_data_t *pInfo, DATA_BLOB *pSerial)
{ {
BYTE * ptr; BYTE * ptr;
DWORD dwStrLen; DWORD dwStrLen;
...@@ -340,7 +340,7 @@ BOOL serialize(struct protect_data_t * pInfo, DATA_BLOB * pSerial) ...@@ -340,7 +340,7 @@ BOOL serialize(struct protect_data_t * pInfo, DATA_BLOB * pSerial)
} }
static static
BOOL unserialize(DATA_BLOB * pSerial, struct protect_data_t * pInfo) BOOL unserialize(const DATA_BLOB *pSerial, struct protect_data_t *pInfo)
{ {
BYTE * ptr; BYTE * ptr;
DWORD index; DWORD index;
...@@ -484,7 +484,7 @@ BOOL unserialize(DATA_BLOB * pSerial, struct protect_data_t * pInfo) ...@@ -484,7 +484,7 @@ BOOL unserialize(DATA_BLOB * pSerial, struct protect_data_t * pInfo)
/* perform sanity checks */ /* perform sanity checks */
static static
BOOL valid_protect_data(struct protect_data_t * pInfo) BOOL valid_protect_data(const struct protect_data_t *pInfo)
{ {
BOOL status=TRUE; BOOL status=TRUE;
...@@ -681,7 +681,7 @@ BOOL convert_hash_to_blob(HCRYPTHASH hHash, DATA_BLOB * blob) ...@@ -681,7 +681,7 @@ BOOL convert_hash_to_blob(HCRYPTHASH hHash, DATA_BLOB * blob)
/* test that a given hash matches an exported-to-blob hash value */ /* test that a given hash matches an exported-to-blob hash value */
static static
BOOL hash_matches_blob(HCRYPTHASH hHash, DATA_BLOB * two) BOOL hash_matches_blob(HCRYPTHASH hHash, const DATA_BLOB *two)
{ {
BOOL rc = FALSE; BOOL rc = FALSE;
DATA_BLOB one; DATA_BLOB one;
...@@ -704,8 +704,8 @@ BOOL hash_matches_blob(HCRYPTHASH hHash, DATA_BLOB * two) ...@@ -704,8 +704,8 @@ BOOL hash_matches_blob(HCRYPTHASH hHash, DATA_BLOB * two)
/* create an encryption key from a given salt and optional entropy */ /* create an encryption key from a given salt and optional entropy */
static static
BOOL load_encryption_key(HCRYPTPROV hProv, DATA_BLOB * salt, BOOL load_encryption_key(HCRYPTPROV hProv, const DATA_BLOB *salt,
DATA_BLOB * pOptionalEntropy, HCRYPTKEY * phKey) const DATA_BLOB *pOptionalEntropy, HCRYPTKEY *phKey)
{ {
BOOL rc = TRUE; BOOL rc = TRUE;
HCRYPTHASH hSaltHash; HCRYPTHASH hSaltHash;
...@@ -768,7 +768,7 @@ BOOL load_encryption_key(HCRYPTPROV hProv, DATA_BLOB * salt, ...@@ -768,7 +768,7 @@ BOOL load_encryption_key(HCRYPTPROV hProv, DATA_BLOB * salt,
/* debugging tool to print the structures of a ProtectData call */ /* debugging tool to print the structures of a ProtectData call */
static void static void
report(DATA_BLOB* pDataIn, DATA_BLOB* pOptionalEntropy, report(const DATA_BLOB* pDataIn, const DATA_BLOB* pOptionalEntropy,
CRYPTPROTECT_PROMPTSTRUCT* pPromptStruct, DWORD dwFlags) CRYPTPROTECT_PROMPTSTRUCT* pPromptStruct, DWORD dwFlags)
{ {
TRACE("pPromptStruct: %p\n", pPromptStruct); TRACE("pPromptStruct: %p\n", pPromptStruct);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment