Leaked source code of windows server 2003
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.

105 lines
1.9 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. //
  5. // Copyright (C) Microsoft Corporation, 1996 - 1999
  6. //
  7. // File: pkifmt.h
  8. //
  9. // Contents: Shared types and functions
  10. //
  11. // APIs:
  12. //
  13. // History: March-2000 xtan created
  14. //--------------------------------------------------------------------------
  15. #ifndef __PKIFMT_H__
  16. #define __PKIFMT_H__
  17. #include "xelib.h"
  18. #if DBG
  19. # ifdef UNICODE
  20. # define szFMTTSTR "ws"
  21. # else
  22. # define szFMTTSTR "hs"
  23. # endif
  24. #endif //DBG
  25. DWORD
  26. SizeBase64Header(
  27. IN TCHAR const *pchIn,
  28. IN DWORD cchIn,
  29. IN BOOL fBegin,
  30. OUT DWORD *pcchSkip);
  31. DWORD
  32. HexDecode(
  33. IN TCHAR const *pchIn,
  34. IN DWORD cchIn,
  35. IN DWORD Flags,
  36. OPTIONAL OUT BYTE *pbOut,
  37. IN OUT DWORD *pcbOut);
  38. DWORD
  39. HexEncode(
  40. IN BYTE const *pbIn,
  41. IN DWORD cbIn,
  42. IN DWORD Flags,
  43. OPTIONAL OUT TCHAR *pchOut,
  44. IN OUT DWORD *pcchOut);
  45. #ifdef __cplusplus
  46. extern "C" {
  47. #endif
  48. #ifdef UNICODE
  49. #define Base64Decode Base64DecodeW
  50. #else
  51. #define Base64Decode Base64DecodeA
  52. #endif // !UNICODE
  53. DWORD // ERROR_*
  54. Base64DecodeA(
  55. IN CHAR const *pchIn,
  56. IN DWORD cchIn,
  57. OUT BYTE *pbOut,
  58. OUT DWORD *pcbOut);
  59. DWORD // ERROR_*
  60. Base64DecodeW(
  61. IN WCHAR const *pchIn,
  62. IN DWORD cchIn,
  63. OUT BYTE *pbOut,
  64. OUT DWORD *pcbOut);
  65. #ifdef UNICODE
  66. #define Base64Encode Base64EncodeW
  67. #else
  68. #define Base64Encode Base64EncodeA
  69. #endif // !UNICODE
  70. DWORD // ERROR_*
  71. Base64EncodeA(
  72. IN BYTE const *pbIn,
  73. IN DWORD cbIn,
  74. IN DWORD Flags,
  75. OUT CHAR *pchOut,
  76. OUT DWORD *pcchOut);
  77. DWORD // ERROR_*
  78. Base64EncodeW(
  79. IN BYTE const *pbIn,
  80. IN DWORD cbIn,
  81. IN DWORD Flags,
  82. OUT WCHAR *pchOut,
  83. OUT DWORD *pcchOut);
  84. #ifdef __cplusplus
  85. } // Balance extern "C" above
  86. #endif
  87. #endif