bcrypt.c 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. /**
  2. * WinPR: Windows Portable Runtime
  3. * Cryptography API: Next Generation
  4. *
  5. * Copyright 2012 Marc-Andre Moreau <marcandre.moreau@gmail.com>
  6. *
  7. * Licensed under the Apache License, Version 2.0 (the "License");
  8. * you may not use this file except in compliance with the License.
  9. * You may obtain a copy of the License at
  10. *
  11. * http://www.apache.org/licenses/LICENSE-2.0
  12. *
  13. * Unless required by applicable law or agreed to in writing, software
  14. * distributed under the License is distributed on an "AS IS" BASIS,
  15. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  16. * See the License for the specific language governing permissions and
  17. * limitations under the License.
  18. */
  19. #ifdef HAVE_CONFIG_H
  20. #include "config.h"
  21. #endif
  22. #include <winpr/bcrypt.h>
  23. /**
  24. * Cryptography API: Next Generation:
  25. * http://msdn.microsoft.com/en-us/library/windows/desktop/aa376210/
  26. */
  27. NTSTATUS BCryptOpenAlgorithmProvider(BCRYPT_ALG_HANDLE* phAlgorithm, LPCWSTR pszAlgId,
  28. LPCWSTR pszImplementation, ULONG dwFlags)
  29. {
  30. return 0;
  31. }
  32. NTSTATUS BCryptCloseAlgorithmProvider(BCRYPT_ALG_HANDLE hAlgorithm, ULONG dwFlags)
  33. {
  34. return 0;
  35. }
  36. NTSTATUS BCryptGetProperty(BCRYPT_HANDLE hObject, LPCWSTR pszProperty, PUCHAR pbOutput,
  37. ULONG cbOutput, ULONG* pcbResult, ULONG dwFlags)
  38. {
  39. return 0;
  40. }
  41. NTSTATUS BCryptCreateHash(BCRYPT_ALG_HANDLE hAlgorithm, BCRYPT_HASH_HANDLE* phHash,
  42. PUCHAR pbHashObject, ULONG cbHashObject, PUCHAR pbSecret, ULONG cbSecret,
  43. ULONG dwFlags)
  44. {
  45. return 0;
  46. }
  47. NTSTATUS BCryptDestroyHash(BCRYPT_HASH_HANDLE hHash)
  48. {
  49. return 0;
  50. }
  51. NTSTATUS BCryptHashData(BCRYPT_HASH_HANDLE hHash, PUCHAR pbInput, ULONG cbInput, ULONG dwFlags)
  52. {
  53. return 0;
  54. }
  55. NTSTATUS BCryptFinishHash(BCRYPT_HASH_HANDLE hHash, PUCHAR pbOutput, ULONG cbOutput, ULONG dwFlags)
  56. {
  57. return 0;
  58. }
  59. NTSTATUS BCryptGenRandom(BCRYPT_ALG_HANDLE hAlgorithm, PUCHAR pbBuffer, ULONG cbBuffer,
  60. ULONG dwFlags)
  61. {
  62. return 0;
  63. }
  64. NTSTATUS BCryptGenerateSymmetricKey(BCRYPT_ALG_HANDLE hAlgorithm, BCRYPT_KEY_HANDLE* phKey,
  65. PUCHAR pbKeyObject, ULONG cbKeyObject, PUCHAR pbSecret,
  66. ULONG cbSecret, ULONG dwFlags)
  67. {
  68. return 0;
  69. }
  70. NTSTATUS BCryptGenerateKeyPair(BCRYPT_ALG_HANDLE hAlgorithm, BCRYPT_KEY_HANDLE* phKey,
  71. ULONG dwLength, ULONG dwFlags)
  72. {
  73. return 0;
  74. }
  75. NTSTATUS BCryptImportKey(BCRYPT_ALG_HANDLE hAlgorithm, BCRYPT_KEY_HANDLE hImportKey,
  76. LPCWSTR pszBlobType, BCRYPT_KEY_HANDLE* phKey, PUCHAR pbKeyObject,
  77. ULONG cbKeyObject, PUCHAR pbInput, ULONG cbInput, ULONG dwFlags)
  78. {
  79. return 0;
  80. }
  81. NTSTATUS BCryptDestroyKey(BCRYPT_KEY_HANDLE hKey)
  82. {
  83. return 0;
  84. }
  85. NTSTATUS BCryptEncrypt(BCRYPT_KEY_HANDLE hKey, PUCHAR pbInput, ULONG cbInput, VOID* pPaddingInfo,
  86. PUCHAR pbIV, ULONG cbIV, PUCHAR pbOutput, ULONG cbOutput, ULONG* pcbResult,
  87. ULONG dwFlags)
  88. {
  89. return 0;
  90. }
  91. NTSTATUS BCryptDecrypt(BCRYPT_KEY_HANDLE hKey, PUCHAR pbInput, ULONG cbInput, VOID* pPaddingInfo,
  92. PUCHAR pbIV, ULONG cbIV, PUCHAR pbOutput, ULONG cbOutput, ULONG* pcbResult,
  93. ULONG dwFlags)
  94. {
  95. return 0;
  96. }