mirror of
https://github.com/mangosfour/server.git
synced 2025-12-29 07:37:05 +00:00
[12632] Revert previous commit (see Notes)
This commit is contained in:
parent
1cd806c02e
commit
ef445ea523
1462 changed files with 9689 additions and 7080 deletions
|
|
@ -212,7 +212,7 @@ static bool BaseFile_Read(
|
|||
return (dwBytesRead == dwBytesToRead);
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* \a pStream Pointer to an open stream
|
||||
* \a pByteOffset Pointer to file byte offset. If NULL, writes to current position
|
||||
* \a pvBuffer Pointer to data to be written
|
||||
|
|
@ -318,7 +318,7 @@ static bool BaseFile_GetSize(
|
|||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* \a pStream Pointer to an open stream
|
||||
* \a NewFileSize New size of the file
|
||||
*/
|
||||
|
|
@ -1699,7 +1699,7 @@ static bool EncryptedStream_Open(TEncryptedStream * pStream)
|
|||
//-----------------------------------------------------------------------------
|
||||
// Public functions
|
||||
|
||||
/**
|
||||
/*
|
||||
* This function creates a new file for read-write access
|
||||
*
|
||||
* - If the current platform supports file sharing,
|
||||
|
|
@ -1762,7 +1762,7 @@ TFileStream * FileStream_CreateFile(
|
|||
return pStream;
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* This function opens an existing file for read or read-write access
|
||||
* - If the current platform supports file sharing,
|
||||
* the file must be open for read sharing (i.e. another application
|
||||
|
|
@ -1873,7 +1873,7 @@ TFileStream * FileStream_OpenFile(
|
|||
return pStream;
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Reads data from the stream
|
||||
*
|
||||
* - Returns true if the read operation succeeded and all bytes have been read
|
||||
|
|
@ -1898,7 +1898,7 @@ bool FileStream_Read(TFileStream * pStream, ULONGLONG * pByteOffset, void * pvBu
|
|||
return pStream->StreamRead(pStream, pByteOffset, pvBuffer, dwBytesToRead);
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* This function writes data to the stream
|
||||
*
|
||||
* - Returns true if the write operation succeeded and all bytes have been written
|
||||
|
|
@ -1919,7 +1919,7 @@ bool FileStream_Write(TFileStream * pStream, ULONGLONG * pByteOffset, const void
|
|||
return pStream->StreamWrite(pStream, pByteOffset, pvBuffer, dwBytesToWrite);
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* This function returns the current file position
|
||||
* \a pStream
|
||||
* \a ByteOffset
|
||||
|
|
@ -1930,7 +1930,7 @@ bool FileStream_GetPos(TFileStream * pStream, ULONGLONG * pByteOffset)
|
|||
return pStream->StreamGetPos(pStream, pByteOffset);
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Returns the size of a file
|
||||
*
|
||||
* \a pStream Pointer to an open stream
|
||||
|
|
@ -1942,7 +1942,7 @@ bool FileStream_GetSize(TFileStream * pStream, ULONGLONG * pFileSize)
|
|||
return pStream->StreamGetSize(pStream, pFileSize);
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Sets the size of a file
|
||||
*
|
||||
* \a pStream Pointer to an open stream
|
||||
|
|
@ -1957,7 +1957,7 @@ bool FileStream_SetSize(TFileStream * pStream, ULONGLONG NewFileSize)
|
|||
return pStream->StreamSetSize(pStream, NewFileSize);
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Returns the last write time of a file
|
||||
*
|
||||
* \a pStream Pointer to an open stream
|
||||
|
|
@ -1969,7 +1969,7 @@ bool FileStream_GetTime(TFileStream * pStream, ULONGLONG * pFileTime)
|
|||
return pStream->StreamGetTime(pStream, pFileTime);
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Returns the stream flags
|
||||
*
|
||||
* \a pStream Pointer to an open stream
|
||||
|
|
@ -1981,7 +1981,7 @@ bool FileStream_GetFlags(TFileStream * pStream, LPDWORD pdwStreamFlags)
|
|||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Switches a stream with another. Used for final phase of archive compacting.
|
||||
* Performs these steps:
|
||||
*
|
||||
|
|
@ -2001,7 +2001,7 @@ bool FileStream_Switch(TFileStream * pStream, TFileStream * pNewStream)
|
|||
return pStream->StreamSwitch(pStream, pNewStream);
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Returns the file name of the stream
|
||||
*
|
||||
* \a pStream Pointer to an open stream
|
||||
|
|
@ -2012,7 +2012,7 @@ TCHAR * FileStream_GetFileName(TFileStream * pStream)
|
|||
return pStream->szFileName;
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Returns true if the stream is read-only
|
||||
*
|
||||
* \a pStream Pointer to an open stream
|
||||
|
|
@ -2022,7 +2022,7 @@ bool FileStream_IsReadOnly(TFileStream * pStream)
|
|||
return (pStream->dwFlags & STREAM_FLAG_READ_ONLY) ? true : false;
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* This function enabled a linear stream to include data bitmap.
|
||||
* Used by MPQs v 4.0 from WoW. Each file block is represented by
|
||||
* a bit in the bitmap. 1 means the block is present, 0 means it's not.
|
||||
|
|
@ -2054,7 +2054,7 @@ bool FileStream_SetBitmap(TFileStream * pStream, TFileBitmap * pBitmap)
|
|||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* This function retrieves the file bitmap. A file bitmap is an array
|
||||
* of bits, each bit representing one file block. A value of 1 means
|
||||
* that the block is present in the file, a value of 0 means that the
|
||||
|
|
@ -2071,7 +2071,7 @@ bool FileStream_GetBitmap(TFileStream * pStream, TFileBitmap * pBitmap, DWORD Le
|
|||
return pStream->StreamGetBmp(pStream, pBitmap, Length, LengthNeeded);
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* This function closes an archive file and frees any data buffers
|
||||
* that have been allocated for stream management. The function must also
|
||||
* support partially allocated structure, i.e. one or more buffers
|
||||
|
|
|
|||
|
|
@ -386,7 +386,7 @@ void DecryptMpqTable(void * pvMpqTable, DWORD dwLength, const char * szKey)
|
|||
}
|
||||
*/
|
||||
|
||||
/**
|
||||
/*
|
||||
* Functions tries to get file decryption key. The trick comes from sector
|
||||
* positions which are stored at the begin of each compressed file. We know the
|
||||
* file size, that means we know number of sectors that means we know the first
|
||||
|
|
|
|||
|
|
@ -10,12 +10,12 @@
|
|||
*/
|
||||
#include "../headers/tomcrypt.h"
|
||||
|
||||
/**
|
||||
/*
|
||||
@file hash_memory.c
|
||||
Hash memory helper, Tom St Denis
|
||||
*/
|
||||
|
||||
/**
|
||||
/*
|
||||
Hash a block of memory and store the digest.
|
||||
@param hash The index of the hash you wish to use
|
||||
@param in The data you wish to hash
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
#include "../headers/tomcrypt.h"
|
||||
|
||||
|
||||
/**
|
||||
/*
|
||||
@file md5.c
|
||||
LTC_MD5 hash function by Tom St Denis
|
||||
*/
|
||||
|
|
@ -225,7 +225,7 @@ static int md5_compress(hash_state *md, unsigned char *buf)
|
|||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
/*
|
||||
Initialize the hash state
|
||||
@param md The hash state you wish to initialize
|
||||
@return CRYPT_OK if successful
|
||||
|
|
@ -242,7 +242,7 @@ int md5_init(hash_state * md)
|
|||
return CRYPT_OK;
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
Process a block of memory though the hash
|
||||
@param md The hash state
|
||||
@param in The data to hash
|
||||
|
|
@ -251,7 +251,7 @@ int md5_init(hash_state * md)
|
|||
*/
|
||||
HASH_PROCESS(md5_process, md5_compress, md5, 64)
|
||||
|
||||
/**
|
||||
/*
|
||||
Terminate the hash to get the digest
|
||||
@param md The hash state
|
||||
@param out [out] The destination of the hash (16 bytes)
|
||||
|
|
@ -306,7 +306,7 @@ int md5_done(hash_state * md, unsigned char *out)
|
|||
return CRYPT_OK;
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
Self-test the hash
|
||||
@return CRYPT_OK if successful, CRYPT_NOP if self-tests have been disabled
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
*/
|
||||
#include "../headers/tomcrypt.h"
|
||||
|
||||
/**
|
||||
/*
|
||||
@file sha1.c
|
||||
LTC_SHA1 code by Tom St Denis
|
||||
*/
|
||||
|
|
@ -157,7 +157,7 @@ static int sha1_compress(hash_state *md, unsigned char *buf)
|
|||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
/*
|
||||
Initialize the hash state
|
||||
@param md The hash state you wish to initialize
|
||||
@return CRYPT_OK if successful
|
||||
|
|
@ -175,7 +175,7 @@ int sha1_init(hash_state * md)
|
|||
return CRYPT_OK;
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
Process a block of memory though the hash
|
||||
@param md The hash state
|
||||
@param in The data to hash
|
||||
|
|
@ -184,7 +184,7 @@ int sha1_init(hash_state * md)
|
|||
*/
|
||||
HASH_PROCESS(sha1_process, sha1_compress, sha1, 64)
|
||||
|
||||
/**
|
||||
/*
|
||||
Terminate the hash to get the digest
|
||||
@param md The hash state
|
||||
@param out [out] The destination of the hash (20 bytes)
|
||||
|
|
@ -238,7 +238,7 @@ int sha1_done(hash_state * md, unsigned char *out)
|
|||
return CRYPT_OK;
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
Self-test the hash
|
||||
@return CRYPT_OK if successful, CRYPT_NOP if self-tests have been disabled
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ static const struct {
|
|||
{ MP_VAL , CRYPT_INVALID_ARG},
|
||||
};
|
||||
|
||||
/**
|
||||
/*
|
||||
Convert a MPI error to a LTC error (Possibly the most powerful function ever! Oh wait... no)
|
||||
@param err The error to convert
|
||||
@return The equivalent LTC error code or CRYPT_ERROR if none found
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
*/
|
||||
#include "../headers/tomcrypt.h"
|
||||
|
||||
/**
|
||||
/*
|
||||
@file rand_prime.c
|
||||
Generate a random prime, Tom St Denis
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
*/
|
||||
#include "../headers/tomcrypt.h"
|
||||
|
||||
/**
|
||||
/*
|
||||
@file base64_decode.c
|
||||
Compliant base64 code donated by Wayne Scott (wscott@bitmover.com)
|
||||
*/
|
||||
|
|
@ -42,7 +42,7 @@ static const unsigned char map[256] = {
|
|||
255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
|
||||
255, 255, 255, 255 };
|
||||
|
||||
/**
|
||||
/*
|
||||
base64 decode a block of memory
|
||||
@param in The base64 data to decode
|
||||
@param inlen The length of the base64 data
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
#include "../headers/tomcrypt.h"
|
||||
#include <signal.h>
|
||||
|
||||
/**
|
||||
/*
|
||||
@file crypt_argchk.c
|
||||
Perform argument checking, Tom St Denis
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -10,12 +10,12 @@
|
|||
*/
|
||||
#include "../headers/tomcrypt.h"
|
||||
|
||||
/**
|
||||
/*
|
||||
@file crypt_find_hash.c
|
||||
Find a hash, Tom St Denis
|
||||
*/
|
||||
|
||||
/**
|
||||
/*
|
||||
Find a registered hash by name
|
||||
@param name The name of the hash to look for
|
||||
@return >= 0 if found, -1 if not present
|
||||
|
|
|
|||
|
|
@ -10,12 +10,12 @@
|
|||
*/
|
||||
#include "../headers/tomcrypt.h"
|
||||
|
||||
/**
|
||||
/*
|
||||
@file crypt_find_prng.c
|
||||
Find a PRNG, Tom St Denis
|
||||
*/
|
||||
|
||||
/**
|
||||
/*
|
||||
Find a registered PRNG by name
|
||||
@param name The name of the PRNG to look for
|
||||
@return >= 0 if found, -1 if not present
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
*/
|
||||
#include "../headers/tomcrypt.h"
|
||||
|
||||
/**
|
||||
/*
|
||||
@file crypt_hash_descriptor.c
|
||||
Stores the hash descriptor table, Tom St Denis
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
*/
|
||||
#include "../headers/tomcrypt.h"
|
||||
|
||||
/**
|
||||
/*
|
||||
@file crypt_hash_is_valid.c
|
||||
Determine if hash is valid, Tom St Denis
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
*/
|
||||
#include "../headers/tomcrypt.h"
|
||||
|
||||
/**
|
||||
/*
|
||||
@file crypt_prng_descriptor.c
|
||||
Stores the PRNG descriptors, Tom St Denis
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
*/
|
||||
#include "../headers/tomcrypt.h"
|
||||
|
||||
/**
|
||||
/*
|
||||
@file crypt_prng_is_valid.c
|
||||
Determine if PRNG is valid, Tom St Denis
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -10,12 +10,12 @@
|
|||
*/
|
||||
#include "../headers/tomcrypt.h"
|
||||
|
||||
/**
|
||||
/*
|
||||
@file crypt_register_hash.c
|
||||
Register a HASH, Tom St Denis
|
||||
*/
|
||||
|
||||
/**
|
||||
/*
|
||||
Register a hash with the descriptor table
|
||||
@param hash The hash you wish to register
|
||||
@return value >= 0 if successfully added (or already present), -1 if unsuccessful
|
||||
|
|
|
|||
|
|
@ -10,12 +10,12 @@
|
|||
*/
|
||||
#include "../headers/tomcrypt.h"
|
||||
|
||||
/**
|
||||
/*
|
||||
@file crypt_register_prng.c
|
||||
Register a PRNG, Tom St Denis
|
||||
*/
|
||||
|
||||
/**
|
||||
/*
|
||||
Register a PRNG with the descriptor table
|
||||
@param prng The PRNG you wish to register
|
||||
@return value >= 0 if successfully added (or already present), -1 if unsuccessful
|
||||
|
|
|
|||
|
|
@ -10,12 +10,12 @@
|
|||
*/
|
||||
#include "../headers/tomcrypt.h"
|
||||
|
||||
/**
|
||||
/*
|
||||
@file zeromem.c
|
||||
Zero a block of memory, Tom St Denis
|
||||
*/
|
||||
|
||||
/**
|
||||
/*
|
||||
Zero a block of memory
|
||||
@param out The destination of the area to zero
|
||||
@param outlen The length of the area to zero (octets)
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
*/
|
||||
#include "../../headers/tomcrypt.h"
|
||||
|
||||
/**
|
||||
/*
|
||||
@file der_decode_bit_string.c
|
||||
ASN.1 DER, encode a BIT STRING, Tom St Denis
|
||||
*/
|
||||
|
|
@ -18,7 +18,7 @@
|
|||
|
||||
#ifdef LTC_DER
|
||||
|
||||
/**
|
||||
/*
|
||||
Store a BIT STRING
|
||||
@param in The DER encoded BIT STRING
|
||||
@param inlen The size of the DER BIT STRING
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
*/
|
||||
#include "../../headers/tomcrypt.h"
|
||||
|
||||
/**
|
||||
/*
|
||||
@file der_decode_boolean.c
|
||||
ASN.1 DER, decode a BOOLEAN, Tom St Denis
|
||||
*/
|
||||
|
|
@ -18,7 +18,7 @@
|
|||
|
||||
#ifdef LTC_DER
|
||||
|
||||
/**
|
||||
/*
|
||||
Read a BOOLEAN
|
||||
@param in The destination for the DER encoded BOOLEAN
|
||||
@param inlen The size of the DER BOOLEAN
|
||||
|
|
|
|||
|
|
@ -10,14 +10,14 @@
|
|||
*/
|
||||
#include "../../headers/tomcrypt.h"
|
||||
|
||||
/**
|
||||
/*
|
||||
@file der_decode_choice.c
|
||||
ASN.1 DER, decode a CHOICE, Tom St Denis
|
||||
*/
|
||||
|
||||
#ifdef LTC_DER
|
||||
|
||||
/**
|
||||
/*
|
||||
Decode a CHOICE
|
||||
@param in The DER encoded input
|
||||
@param inlen [in/out] The size of the input and resulting size of read type
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
*/
|
||||
#include "../../headers/tomcrypt.h"
|
||||
|
||||
/**
|
||||
/*
|
||||
@file der_decode_ia5_string.c
|
||||
ASN.1 DER, encode a IA5 STRING, Tom St Denis
|
||||
*/
|
||||
|
|
@ -18,7 +18,7 @@
|
|||
|
||||
#ifdef LTC_DER
|
||||
|
||||
/**
|
||||
/*
|
||||
Store a IA5 STRING
|
||||
@param in The DER encoded IA5 STRING
|
||||
@param inlen The size of the DER IA5 STRING
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
*/
|
||||
#include "../../headers/tomcrypt.h"
|
||||
|
||||
/**
|
||||
/*
|
||||
@file der_decode_integer.c
|
||||
ASN.1 DER, decode an integer, Tom St Denis
|
||||
*/
|
||||
|
|
@ -18,7 +18,7 @@
|
|||
|
||||
#ifdef LTC_DER
|
||||
|
||||
/**
|
||||
/*
|
||||
Read a mp_int integer
|
||||
@param in The DER encoded data
|
||||
@param inlen Size of DER encoded data
|
||||
|
|
|
|||
|
|
@ -10,13 +10,13 @@
|
|||
*/
|
||||
#include "../../headers/tomcrypt.h"
|
||||
|
||||
/**
|
||||
/*
|
||||
@file der_decode_object_identifier.c
|
||||
ASN.1 DER, Decode Object Identifier, Tom St Denis
|
||||
*/
|
||||
|
||||
#ifdef LTC_DER
|
||||
/**
|
||||
/*
|
||||
Decode OID data and store the array of integers in words
|
||||
@param in The OID DER encoded data
|
||||
@param inlen The length of the OID data
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
*/
|
||||
#include "../../headers/tomcrypt.h"
|
||||
|
||||
/**
|
||||
/*
|
||||
@file der_decode_octet_string.c
|
||||
ASN.1 DER, encode a OCTET STRING, Tom St Denis
|
||||
*/
|
||||
|
|
@ -18,7 +18,7 @@
|
|||
|
||||
#ifdef LTC_DER
|
||||
|
||||
/**
|
||||
/*
|
||||
Store a OCTET STRING
|
||||
@param in The DER encoded OCTET STRING
|
||||
@param inlen The size of the DER OCTET STRING
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
*/
|
||||
#include "../../headers/tomcrypt.h"
|
||||
|
||||
/**
|
||||
/*
|
||||
@file der_decode_printable_string.c
|
||||
ASN.1 DER, encode a printable STRING, Tom St Denis
|
||||
*/
|
||||
|
|
@ -18,7 +18,7 @@
|
|||
|
||||
#ifdef LTC_DER
|
||||
|
||||
/**
|
||||
/*
|
||||
Store a printable STRING
|
||||
@param in The DER encoded printable STRING
|
||||
@param inlen The size of the DER printable STRING
|
||||
|
|
|
|||
|
|
@ -12,14 +12,14 @@
|
|||
#include <stdarg.h>
|
||||
|
||||
|
||||
/**
|
||||
/*
|
||||
@file der_decode_sequence_ex.c
|
||||
ASN.1 DER, decode a SEQUENCE, Tom St Denis
|
||||
*/
|
||||
|
||||
#ifdef LTC_DER
|
||||
|
||||
/**
|
||||
/*
|
||||
Decode a SEQUENCE
|
||||
@param in The DER encoded input
|
||||
@param inlen The size of the input
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
*/
|
||||
#include "../../headers/tomcrypt.h"
|
||||
|
||||
/**
|
||||
/*
|
||||
@file der_decode_sequence_flexi.c
|
||||
ASN.1 DER, decode an array of ASN.1 types with a flexi parser, Tom St Denis
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -12,14 +12,14 @@
|
|||
#include <stdarg.h>
|
||||
|
||||
|
||||
/**
|
||||
/*
|
||||
@file der_decode_sequence_multi.c
|
||||
ASN.1 DER, decode a SEQUENCE, Tom St Denis
|
||||
*/
|
||||
|
||||
#ifdef LTC_DER
|
||||
|
||||
/**
|
||||
/*
|
||||
Decode a SEQUENCE type using a VA list
|
||||
@param in Input buffer
|
||||
@param inlen Length of input in octets
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
*/
|
||||
#include "../../headers/tomcrypt.h"
|
||||
|
||||
/**
|
||||
/*
|
||||
@file der_decode_short_integer.c
|
||||
ASN.1 DER, decode an integer, Tom St Denis
|
||||
*/
|
||||
|
|
@ -18,7 +18,7 @@
|
|||
|
||||
#ifdef LTC_DER
|
||||
|
||||
/**
|
||||
/*
|
||||
Read a short integer
|
||||
@param in The DER encoded data
|
||||
@param inlen Size of data
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
*/
|
||||
#include "../../headers/tomcrypt.h"
|
||||
|
||||
/**
|
||||
/*
|
||||
@file der_decode_utctime.c
|
||||
ASN.1 DER, decode a UTCTIME, Tom St Denis
|
||||
*/
|
||||
|
|
@ -39,7 +39,7 @@ static int char_to_int(unsigned char x)
|
|||
if (y >= max) return CRYPT_INVALID_PACKET; \
|
||||
x += 2;
|
||||
|
||||
/**
|
||||
/*
|
||||
Decodes a UTC time structure in DER format (reads all 6 valid encoding formats)
|
||||
@param in Input buffer
|
||||
@param inlen Length of input buffer in octets
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
*/
|
||||
#include "../../headers/tomcrypt.h"
|
||||
|
||||
/**
|
||||
/*
|
||||
@file der_decode_utf8_string.c
|
||||
ASN.1 DER, encode a UTF8 STRING, Tom St Denis
|
||||
*/
|
||||
|
|
@ -18,7 +18,7 @@
|
|||
|
||||
#ifdef LTC_DER
|
||||
|
||||
/**
|
||||
/*
|
||||
Store a UTF8 STRING
|
||||
@param in The DER encoded UTF8 STRING
|
||||
@param inlen The size of the DER UTF8 STRING
|
||||
|
|
|
|||
|
|
@ -10,13 +10,13 @@
|
|||
*/
|
||||
#include "../../headers/tomcrypt.h"
|
||||
|
||||
/**
|
||||
/*
|
||||
@file der_length_bit_string.c
|
||||
ASN.1 DER, get length of BIT STRING, Tom St Denis
|
||||
*/
|
||||
|
||||
#ifdef LTC_DER
|
||||
/**
|
||||
/*
|
||||
Gets length of DER encoding of BIT STRING
|
||||
@param nbits The number of bits in the string to encode
|
||||
@param outlen [out] The length of the DER encoding for the given string
|
||||
|
|
|
|||
|
|
@ -10,13 +10,13 @@
|
|||
*/
|
||||
#include "../../headers/tomcrypt.h"
|
||||
|
||||
/**
|
||||
/*
|
||||
@file der_length_boolean.c
|
||||
ASN.1 DER, get length of a BOOLEAN, Tom St Denis
|
||||
*/
|
||||
|
||||
#ifdef LTC_DER
|
||||
/**
|
||||
/*
|
||||
Gets length of DER encoding of a BOOLEAN
|
||||
@param outlen [out] The length of the DER encoding
|
||||
@return CRYPT_OK if successful
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
*/
|
||||
#include "../../headers/tomcrypt.h"
|
||||
|
||||
/**
|
||||
/*
|
||||
@file der_length_ia5_string.c
|
||||
ASN.1 DER, get length of IA5 STRING, Tom St Denis
|
||||
*/
|
||||
|
|
@ -146,7 +146,7 @@ int der_ia5_value_decode(int v)
|
|||
return -1;
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
Gets length of DER encoding of IA5 STRING
|
||||
@param octets The values you want to encode
|
||||
@param noctets The number of octets in the string to encode
|
||||
|
|
|
|||
|
|
@ -10,14 +10,14 @@
|
|||
*/
|
||||
#include "../../headers/tomcrypt.h"
|
||||
|
||||
/**
|
||||
/*
|
||||
@file der_length_integer.c
|
||||
ASN.1 DER, get length of encoding, Tom St Denis
|
||||
*/
|
||||
|
||||
|
||||
#ifdef LTC_DER
|
||||
/**
|
||||
/*
|
||||
Gets length of DER encoding of num
|
||||
@param num The int to get the size of
|
||||
@param outlen [out] The length of the DER encoding for the given integer
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
*/
|
||||
#include "../../headers/tomcrypt.h"
|
||||
|
||||
/**
|
||||
/*
|
||||
@file der_length_object_identifier.c
|
||||
ASN.1 DER, get length of Object Identifier, Tom St Denis
|
||||
*/
|
||||
|
|
@ -30,7 +30,7 @@ unsigned long der_object_identifier_bits(unsigned long x)
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
/*
|
||||
Gets length of DER encoding of Object Identifier
|
||||
@param nwords The number of OID words
|
||||
@param words The actual OID words to get the size of
|
||||
|
|
|
|||
|
|
@ -10,13 +10,13 @@
|
|||
*/
|
||||
#include "../../headers/tomcrypt.h"
|
||||
|
||||
/**
|
||||
/*
|
||||
@file der_length_octet_string.c
|
||||
ASN.1 DER, get length of OCTET STRING, Tom St Denis
|
||||
*/
|
||||
|
||||
#ifdef LTC_DER
|
||||
/**
|
||||
/*
|
||||
Gets length of DER encoding of OCTET STRING
|
||||
@param noctets The number of octets in the string to encode
|
||||
@param outlen [out] The length of the DER encoding for the given string
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
*/
|
||||
#include "../../headers/tomcrypt.h"
|
||||
|
||||
/**
|
||||
/*
|
||||
@file der_length_printable_string.c
|
||||
ASN.1 DER, get length of Printable STRING, Tom St Denis
|
||||
*/
|
||||
|
|
@ -118,7 +118,7 @@ int der_printable_value_decode(int v)
|
|||
return -1;
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
Gets length of DER encoding of Printable STRING
|
||||
@param octets The values you want to encode
|
||||
@param noctets The number of octets in the string to encode
|
||||
|
|
|
|||
|
|
@ -10,14 +10,14 @@
|
|||
*/
|
||||
#include "../../headers/tomcrypt.h"
|
||||
|
||||
/**
|
||||
/*
|
||||
@file der_length_sequence.c
|
||||
ASN.1 DER, length a SEQUENCE, Tom St Denis
|
||||
*/
|
||||
|
||||
#ifdef LTC_DER
|
||||
|
||||
/**
|
||||
/*
|
||||
Get the length of a DER sequence
|
||||
@param list The sequences of items in the SEQUENCE
|
||||
@param inlen The number of items
|
||||
|
|
|
|||
|
|
@ -10,14 +10,14 @@
|
|||
*/
|
||||
#include "../../headers/tomcrypt.h"
|
||||
|
||||
/**
|
||||
/*
|
||||
@file der_length_short_integer.c
|
||||
ASN.1 DER, get length of encoding, Tom St Denis
|
||||
*/
|
||||
|
||||
|
||||
#ifdef LTC_DER
|
||||
/**
|
||||
/*
|
||||
Gets length of DER encoding of num
|
||||
@param num The integer to get the size of
|
||||
@param outlen [out] The length of the DER encoding for the given integer
|
||||
|
|
|
|||
|
|
@ -10,14 +10,14 @@
|
|||
*/
|
||||
#include "../../headers/tomcrypt.h"
|
||||
|
||||
/**
|
||||
/*
|
||||
@file der_length_utctime.c
|
||||
ASN.1 DER, get length of UTCTIME, Tom St Denis
|
||||
*/
|
||||
|
||||
#ifdef LTC_DER
|
||||
|
||||
/**
|
||||
/*
|
||||
Gets length of DER encoding of UTCTIME
|
||||
@param utctime The UTC time structure to get the size of
|
||||
@param outlen [out] The length of the DER encoding
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
*/
|
||||
#include "../../headers/tomcrypt.h"
|
||||
|
||||
/**
|
||||
/*
|
||||
@file der_length_utf8_string.c
|
||||
ASN.1 DER, get length of UTF8 STRING, Tom St Denis
|
||||
*/
|
||||
|
|
@ -34,7 +34,7 @@ unsigned long der_utf8_charsize(const wchar_t c)
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
Gets length of DER encoding of UTF8 STRING
|
||||
@param in The characters to measure the length of
|
||||
@param noctets The number of octets in the string to encode
|
||||
|
|
|
|||
|
|
@ -10,14 +10,14 @@
|
|||
*/
|
||||
#include "../../headers/tomcrypt.h"
|
||||
|
||||
/**
|
||||
/*
|
||||
@file der_sequence_free.c
|
||||
ASN.1 DER, free's a structure allocated by der_decode_sequence_flexi(), Tom St Denis
|
||||
*/
|
||||
|
||||
#ifdef LTC_DER
|
||||
|
||||
/**
|
||||
/*
|
||||
Free memory allocated by der_decode_sequence_flexi()
|
||||
@param in The list to free
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -16,14 +16,14 @@
|
|||
*/
|
||||
#include "../../headers/tomcrypt.h"
|
||||
|
||||
/**
|
||||
/*
|
||||
@file ltc_ecc_map.c
|
||||
ECC Crypto, Tom St Denis
|
||||
*/
|
||||
|
||||
#ifdef LTC_MECC
|
||||
|
||||
/**
|
||||
/*
|
||||
Map a projective jacbobian point back to affine space
|
||||
@param P [in/out] The point to map
|
||||
@param modulus The modulus of the field the ECC curve is in
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
*/
|
||||
#include "../../headers/tomcrypt.h"
|
||||
|
||||
/**
|
||||
/*
|
||||
@file ltc_ecc_mul2add.c
|
||||
ECC Crypto, Shamir's Trick, Tom St Denis
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
*/
|
||||
#include "../../headers/tomcrypt.h"
|
||||
|
||||
/**
|
||||
/*
|
||||
@file ltc_ecc_mulmod.c
|
||||
ECC Crypto, Tom St Denis
|
||||
*/
|
||||
|
|
@ -27,7 +27,7 @@
|
|||
/* size of sliding window, don't change this! */
|
||||
#define WINSIZE 4
|
||||
|
||||
/**
|
||||
/*
|
||||
Perform a point multiplication
|
||||
@param k The scalar to multiply by
|
||||
@param G The base point
|
||||
|
|
|
|||
|
|
@ -16,14 +16,14 @@
|
|||
*/
|
||||
#include "../../headers/tomcrypt.h"
|
||||
|
||||
/**
|
||||
/*
|
||||
@file ltc_ecc_points.c
|
||||
ECC Crypto, Tom St Denis
|
||||
*/
|
||||
|
||||
#ifdef LTC_MECC
|
||||
|
||||
/**
|
||||
/*
|
||||
Allocate a new ECC point
|
||||
@return A newly allocated point or NULL on error
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -16,14 +16,14 @@
|
|||
*/
|
||||
#include "../../headers/tomcrypt.h"
|
||||
|
||||
/**
|
||||
/*
|
||||
@file ltc_ecc_projective_add_point.c
|
||||
ECC Crypto, Tom St Denis
|
||||
*/
|
||||
|
||||
#if defined(LTC_MECC) && (!defined(LTC_MECC_ACCEL) || defined(LTM_LTC_DESC))
|
||||
|
||||
/**
|
||||
/*
|
||||
Add two ECC points
|
||||
@param P The point to add
|
||||
@param Q The point to add
|
||||
|
|
|
|||
|
|
@ -16,14 +16,14 @@
|
|||
*/
|
||||
#include "../../headers/tomcrypt.h"
|
||||
|
||||
/**
|
||||
/*
|
||||
@file ltc_ecc_projective_dbl_point.c
|
||||
ECC Crypto, Tom St Denis
|
||||
*/
|
||||
|
||||
#if defined(LTC_MECC) && (!defined(LTC_MECC_ACCEL) || defined(LTM_LTC_DESC))
|
||||
|
||||
/**
|
||||
/*
|
||||
Double an ECC point
|
||||
@param P The point to double
|
||||
@param R [out] The destination of the double
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
#ifdef LTC_PKCS_1
|
||||
|
||||
/**
|
||||
/*
|
||||
Perform LTC_PKCS #1 MGF1 (internal)
|
||||
@param seed The seed for MGF1
|
||||
@param seedlen The length of the seed
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
#ifdef LTC_PKCS_1
|
||||
|
||||
/**
|
||||
/*
|
||||
LTC_PKCS #1 v2.00 OAEP decode
|
||||
@param msg The encoded data to decode
|
||||
@param msglen The length of the encoded data (octets)
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
#ifdef LTC_PKCS_1
|
||||
|
||||
/**
|
||||
/*
|
||||
LTC_PKCS #1 v2.00 PSS decode
|
||||
@param msghash The hash to verify
|
||||
@param msghashlen The length of the hash (octets)
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
*/
|
||||
#include "../../headers/tomcrypt.h"
|
||||
|
||||
/**
|
||||
/*
|
||||
@file rsa_exptmod.c
|
||||
RSA LTC_PKCS exptmod, Tom St Denis
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -10,14 +10,14 @@
|
|||
*/
|
||||
#include "../../headers/tomcrypt.h"
|
||||
|
||||
/**
|
||||
/*
|
||||
@file rsa_free.c
|
||||
Free an RSA key, Tom St Denis
|
||||
*/
|
||||
|
||||
#ifdef LTC_MRSA
|
||||
|
||||
/**
|
||||
/*
|
||||
Free an RSA key from memory
|
||||
@param key The RSA key to free
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -10,14 +10,14 @@
|
|||
*/
|
||||
#include "../../headers/tomcrypt.h"
|
||||
|
||||
/**
|
||||
/*
|
||||
@file rsa_import.c
|
||||
Import a LTC_PKCS RSA key, Tom St Denis
|
||||
*/
|
||||
|
||||
#ifdef LTC_MRSA
|
||||
|
||||
/**
|
||||
/*
|
||||
Import an RSAPublicKey or RSAPrivateKey [two-prime only, only support >= 1024-bit keys, defined in LTC_PKCS #1 v2.1]
|
||||
@param in The packet to import from
|
||||
@param inlen It's length (octets)
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
*/
|
||||
#include "../../headers/tomcrypt.h"
|
||||
|
||||
/**
|
||||
/*
|
||||
@file rsa_make_key.c
|
||||
RSA key generation, Tom St Denis
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -10,14 +10,14 @@
|
|||
*/
|
||||
#include "../../headers/tomcrypt.h"
|
||||
|
||||
/**
|
||||
/*
|
||||
@file rsa_verify_hash.c
|
||||
RSA LTC_PKCS #1 v1.5 or v2 PSS signature verification, Tom St Denis and Andreas Lange
|
||||
*/
|
||||
|
||||
#ifdef LTC_MRSA
|
||||
|
||||
/**
|
||||
/*
|
||||
LTC_PKCS #1 de-sign then v1.5 or PSS depad
|
||||
@param sig The signature data
|
||||
@param siglen The length of the signature data (octets)
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
*/
|
||||
#include "../../headers/tomcrypt.h"
|
||||
|
||||
/**
|
||||
/*
|
||||
@file rsa_verify_simple.c
|
||||
Created by Ladislav Zezula (zezula@volny.cz) as modification
|
||||
for Blizzard strong signature verification
|
||||
|
|
@ -18,7 +18,7 @@
|
|||
|
||||
#ifdef LTC_MRSA
|
||||
|
||||
/**
|
||||
/*
|
||||
Simple RSA decryption
|
||||
@param sig The signature data
|
||||
@param siglen The length of the signature data (octets)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue