KSG_EncodeDecode.h
Upload User: dzyhzl
Upload Date: 2019-04-29
Package Size: 56270k
Code Size: 1k
Development Platform:

C/C++

  1. //////////////////////////////////////////////////////////////////////////////////////
  2. //
  3. //  FileName    :   KSG_EncodeDecode.h
  4. //  Version     :   1.0
  5. //  Creater     :   
  6. //  Date        :   2003-6-3 10:29:43
  7. //  Comment     :   
  8. //
  9. //////////////////////////////////////////////////////////////////////////////////////
  10. #ifndef _KSG_ENCODEDECODE_H
  11. #define _KSG_ENCODEDECODE_H 1
  12. #include <crtdbg.h>
  13. int KSG_DecodeEncode(size_t uSize, unsigned char *pbyBuf, unsigned *puKey);
  14. int KSG_DecodeEncode_ASM(size_t uSize, unsigned char *pbyBuf, unsigned *puKey);
  15. inline int KSG_DecodeBuf(size_t uSize, unsigned char *pbyBuf, unsigned *puKey)
  16. {
  17.     _ASSERT(uSize);
  18.     _ASSERT(pbyBuf);
  19.     _ASSERT(puKey);
  20. unsigned uKey = *puKey;
  21.     //return KSG_DecodeEncode(uSize, pbyBuf, puKey);
  22.     return KSG_DecodeEncode_ASM(uSize, pbyBuf, &uKey);
  23. }
  24. inline int KSG_EncodeBuf(size_t uSize, unsigned char *pbyBuf, unsigned *puKey)
  25. {
  26.     _ASSERT(uSize);
  27.     _ASSERT(pbyBuf);
  28.     _ASSERT(puKey);
  29. unsigned uKey = *puKey;
  30.     //return KSG_DecodeEncode(uSize, pbyBuf, puKey);
  31.     return KSG_DecodeEncode_ASM(uSize, pbyBuf, &uKey);
  32. }
  33. #endif  // _KSG_ENCODEDECODE_H