|
ReactOS 0.4.17-dev-470-gf9e3448
|
#include <stdarg.h>#include "windef.h"#include "winbase.h"#include "winerror.h"#include "wincrypt.h"#include "wine/debug.h"
Go to the source code of this file.
Macros | |
| #define | CERT_HEADER "-----BEGIN CERTIFICATE-----" |
| #define | CERT_HEADER_START "-----BEGIN " |
| #define | CERT_DELIMITER "-----" |
| #define | CERT_TRAILER "-----END CERTIFICATE-----" |
| #define | CERT_TRAILER_START "-----END " |
| #define | CERT_REQUEST_HEADER "-----BEGIN NEW CERTIFICATE REQUEST-----" |
| #define | CERT_REQUEST_TRAILER "-----END NEW CERTIFICATE REQUEST-----" |
| #define | X509_HEADER "-----BEGIN X509 CRL-----" |
| #define | X509_TRAILER "-----END X509 CRL-----" |
| #define | BASE64_DECODE_PADDING 0x100 |
| #define | BASE64_DECODE_WHITESPACE 0x200 |
| #define | BASE64_DECODE_INVALID 0x300 |
Typedefs | |
| typedef BOOL(* | BinaryToStringAFunc) (const BYTE *pbBinary, DWORD cbBinary, DWORD dwFlags, LPSTR pszString, DWORD *pcchString) |
| typedef BOOL(* | BinaryToStringWFunc) (const BYTE *pbBinary, DWORD cbBinary, DWORD dwFlags, LPWSTR pszString, DWORD *pcchString) |
| typedef LONG(* | StringToBinaryAFunc) (LPCSTR pszString, DWORD cchString, BYTE *pbBinary, DWORD *pcbBinary, DWORD *pdwSkip, DWORD *pdwFlags) |
| typedef LONG(* | StringToBinaryWFunc) (LPCWSTR pszString, DWORD cchString, BYTE *pbBinary, DWORD *pcbBinary, DWORD *pdwSkip, DWORD *pdwFlags) |
Functions | |
| WINE_DEFAULT_DEBUG_CHANNEL (crypt) | |
| static BOOL | EncodeBinaryToBinaryA (const BYTE *pbBinary, DWORD cbBinary, DWORD dwFlags, LPSTR pszString, DWORD *pcchString) |
| static DWORD | stradd (LPSTR ptr, LPCSTR end, LPCSTR s, DWORD slen) |
| static DWORD | encodeBase64A (const BYTE *in_buf, int in_len, LPCSTR sep, char *out_buf, DWORD *out_len) |
| static BOOL | BinaryToBase64A (const BYTE *pbBinary, DWORD cbBinary, DWORD dwFlags, LPSTR pszString, DWORD *pcchString) |
| static BOOL | BinaryToHexRawA (const BYTE *bin, DWORD nbin, DWORD flags, char *str, DWORD *nstr) |
| BOOL WINAPI | CryptBinaryToStringA (const BYTE *pbBinary, DWORD cbBinary, DWORD dwFlags, LPSTR pszString, DWORD *pcchString) |
| static BOOL | EncodeBinaryToBinaryW (const BYTE *in_buf, DWORD in_len, DWORD flags, WCHAR *out_buf, DWORD *out_len) |
| static LONG | encodeBase64W (const BYTE *in_buf, int in_len, LPCWSTR sep, WCHAR *out_buf, DWORD *out_len) |
| static BOOL | BinaryToBase64W (const BYTE *pbBinary, DWORD cbBinary, DWORD dwFlags, LPWSTR pszString, DWORD *pcchString) |
| static BOOL | BinaryToHexRawW (const BYTE *bin, DWORD nbin, DWORD flags, LPWSTR str, DWORD *nstr) |
| static BOOL | binary_to_hexW (const BYTE *bin, DWORD nbin, DWORD flags, LPWSTR str, DWORD *nstr) |
| BOOL WINAPI | CryptBinaryToStringW (const BYTE *pbBinary, DWORD cbBinary, DWORD dwFlags, LPWSTR pszString, DWORD *pcchString) |
| static int | decodeBase64Byte (int c) |
| static LONG | Base64ToBinary (const void *pszString, BOOL wide, DWORD cchString, BYTE *pbBinary, DWORD *pcbBinary, DWORD *pdwSkip, DWORD *pdwFlags) |
| static LONG | Base64ToBinaryA (LPCSTR pszString, DWORD cchString, BYTE *pbBinary, DWORD *pcbBinary, DWORD *pdwSkip, DWORD *pdwFlags) |
| static LONG | Base64WithHeaderAndTrailerToBinaryA (LPCSTR pszString, DWORD cchString, BYTE *pbBinary, DWORD *pcbBinary, DWORD *pdwSkip) |
| static LONG | Base64HeaderToBinaryA (LPCSTR pszString, DWORD cchString, BYTE *pbBinary, DWORD *pcbBinary, DWORD *pdwSkip, DWORD *pdwFlags) |
| static LONG | Base64RequestHeaderToBinaryA (LPCSTR pszString, DWORD cchString, BYTE *pbBinary, DWORD *pcbBinary, DWORD *pdwSkip, DWORD *pdwFlags) |
| static LONG | Base64X509HeaderToBinaryA (LPCSTR pszString, DWORD cchString, BYTE *pbBinary, DWORD *pcbBinary, DWORD *pdwSkip, DWORD *pdwFlags) |
| static LONG | Base64AnyToBinaryA (LPCSTR pszString, DWORD cchString, BYTE *pbBinary, DWORD *pcbBinary, DWORD *pdwSkip, DWORD *pdwFlags) |
| static LONG | DecodeBinaryToBinaryA (LPCSTR pszString, DWORD cchString, BYTE *pbBinary, DWORD *pcbBinary, DWORD *pdwSkip, DWORD *pdwFlags) |
| static LONG | DecodeAnyA (LPCSTR pszString, DWORD cchString, BYTE *pbBinary, DWORD *pcbBinary, DWORD *pdwSkip, DWORD *pdwFlags) |
| static BOOL | is_hex_string_special_char (WCHAR c) |
| static WCHAR | wchar_from_str (BOOL wide, const void **str, DWORD *len) |
| static BYTE | digit_from_char (WCHAR c) |
| static LONG | string_to_hex (const void *str, BOOL wide, DWORD len, BYTE *hex, DWORD *hex_len, DWORD *skipped, DWORD *ret_flags) |
| static LONG | string_to_hexA (const char *str, DWORD len, BYTE *hex, DWORD *hex_len, DWORD *skipped, DWORD *ret_flags) |
| BOOL WINAPI | CryptStringToBinaryA (LPCSTR pszString, DWORD cchString, DWORD dwFlags, BYTE *pbBinary, DWORD *pcbBinary, DWORD *pdwSkip, DWORD *pdwFlags) |
| static LONG | Base64ToBinaryW (LPCWSTR pszString, DWORD cchString, BYTE *pbBinary, DWORD *pcbBinary, DWORD *pdwSkip, DWORD *pdwFlags) |
| static LONG | Base64WithHeaderAndTrailerToBinaryW (LPCWSTR pszString, DWORD cchString, BYTE *pbBinary, DWORD *pcbBinary, DWORD *pdwSkip) |
| static LONG | Base64HeaderToBinaryW (LPCWSTR pszString, DWORD cchString, BYTE *pbBinary, DWORD *pcbBinary, DWORD *pdwSkip, DWORD *pdwFlags) |
| static LONG | Base64RequestHeaderToBinaryW (LPCWSTR pszString, DWORD cchString, BYTE *pbBinary, DWORD *pcbBinary, DWORD *pdwSkip, DWORD *pdwFlags) |
| static LONG | Base64X509HeaderToBinaryW (LPCWSTR pszString, DWORD cchString, BYTE *pbBinary, DWORD *pcbBinary, DWORD *pdwSkip, DWORD *pdwFlags) |
| static LONG | Base64AnyToBinaryW (LPCWSTR pszString, DWORD cchString, BYTE *pbBinary, DWORD *pcbBinary, DWORD *pdwSkip, DWORD *pdwFlags) |
| static LONG | DecodeBinaryToBinaryW (LPCWSTR pszString, DWORD cchString, BYTE *pbBinary, DWORD *pcbBinary, DWORD *pdwSkip, DWORD *pdwFlags) |
| static LONG | DecodeAnyW (LPCWSTR pszString, DWORD cchString, BYTE *pbBinary, DWORD *pcbBinary, DWORD *pdwSkip, DWORD *pdwFlags) |
| static LONG | string_to_hexW (const WCHAR *str, DWORD len, BYTE *hex, DWORD *hex_len, DWORD *skipped, DWORD *ret_flags) |
| BOOL WINAPI | CryptStringToBinaryW (LPCWSTR pszString, DWORD cchString, DWORD dwFlags, BYTE *pbBinary, DWORD *pcbBinary, DWORD *pdwSkip, DWORD *pdwFlags) |
Variables | |
| static const WCHAR | CERT_HEADER_W [] = L"-----BEGIN CERTIFICATE-----" |
| static const WCHAR | CERT_HEADER_START_W [] = L"-----BEGIN " |
| static const WCHAR | CERT_DELIMITER_W [] = L"-----" |
| static const WCHAR | CERT_TRAILER_W [] = L"-----END CERTIFICATE-----" |
| static const WCHAR | CERT_TRAILER_START_W [] = L"-----END " |
| static const WCHAR | CERT_REQUEST_HEADER_W [] = L"-----BEGIN NEW CERTIFICATE REQUEST-----" |
| static const WCHAR | CERT_REQUEST_TRAILER_W [] = L"-----END NEW CERTIFICATE REQUEST-----" |
| static const WCHAR | X509_HEADER_W [] = L"-----BEGIN X509 CRL-----" |
| static const WCHAR | X509_TRAILER_W [] = L"-----END X509 CRL-----" |
| static const char | b64 [] |
|
static |
Definition at line 895 of file base64.c.
Referenced by CryptStringToBinaryA().
|
static |
Definition at line 1222 of file base64.c.
Referenced by CryptStringToBinaryW().
|
static |
Definition at line 862 of file base64.c.
Referenced by Base64AnyToBinaryA(), CryptStringToBinaryA(), and DecodeAnyA().
|
static |
Definition at line 1189 of file base64.c.
Referenced by Base64AnyToBinaryW(), CryptStringToBinaryW(), and DecodeAnyW().
|
static |
Definition at line 873 of file base64.c.
Referenced by CryptStringToBinaryA().
|
static |
Definition at line 1200 of file base64.c.
Referenced by CryptStringToBinaryW().
|
static |
Definition at line 723 of file base64.c.
Referenced by Base64ToBinaryA(), and Base64ToBinaryW().
|
static |
Definition at line 805 of file base64.c.
Referenced by Base64AnyToBinaryA(), Base64WithHeaderAndTrailerToBinaryA(), CryptStringToBinaryA(), and DecodeAnyA().
|
static |
Definition at line 1132 of file base64.c.
Referenced by Base64AnyToBinaryW(), Base64WithHeaderAndTrailerToBinaryW(), CryptStringToBinaryW(), and DecodeAnyW().
|
static |
Definition at line 811 of file base64.c.
Referenced by Base64HeaderToBinaryA(), Base64RequestHeaderToBinaryA(), and Base64X509HeaderToBinaryA().
|
static |
Definition at line 1138 of file base64.c.
Referenced by Base64HeaderToBinaryW(), Base64RequestHeaderToBinaryW(), and Base64X509HeaderToBinaryW().
|
static |
Definition at line 884 of file base64.c.
Referenced by CryptStringToBinaryA().
|
static |
Definition at line 1211 of file base64.c.
Referenced by CryptStringToBinaryW().
|
static |
Definition at line 571 of file base64.c.
Referenced by CryptBinaryToStringW().
|
static |
Definition at line 166 of file base64.c.
Referenced by CryptBinaryToStringA().
|
static |
Definition at line 449 of file base64.c.
Referenced by CryptBinaryToStringW().
|
static |
Definition at line 245 of file base64.c.
Referenced by CryptBinaryToStringA().
|
static |
Definition at line 525 of file base64.c.
Referenced by CryptBinaryToStringW().
| BOOL WINAPI CryptBinaryToStringA | ( | const BYTE * | pbBinary, |
| DWORD | cbBinary, | ||
| DWORD | dwFlags, | ||
| LPSTR | pszString, | ||
| DWORD * | pcchString | ||
| ) |
Definition at line 302 of file base64.c.
Referenced by create_websocket_accept(), encodeAndCompareBase64_A(), save_base64(), and test_CryptBinaryToString().
| BOOL WINAPI CryptBinaryToStringW | ( | const BYTE * | pbBinary, |
| DWORD | cbBinary, | ||
| DWORD | dwFlags, | ||
| LPWSTR | pszString, | ||
| DWORD * | pcchString | ||
| ) |
Definition at line 644 of file base64.c.
Referenced by build_request_path(), encode_compare_base64_W(), and test_CryptBinaryToString().
| BOOL WINAPI CryptStringToBinaryA | ( | LPCSTR | pszString, |
| DWORD | cchString, | ||
| DWORD | dwFlags, | ||
| BYTE * | pbBinary, | ||
| DWORD * | pcbBinary, | ||
| DWORD * | pdwSkip, | ||
| DWORD * | pdwFlags | ||
| ) |
Definition at line 1062 of file base64.c.
Referenced by CRYPT_QueryContextObject(), CRYPT_QueryMessageObject(), decode_base64_blob(), decodeAndCompareBase64_A(), decodeBase64WithLenFmt(), and test_CryptStringToBinary().
| BOOL WINAPI CryptStringToBinaryW | ( | LPCWSTR | pszString, |
| DWORD | cchString, | ||
| DWORD | dwFlags, | ||
| BYTE * | pbBinary, | ||
| DWORD * | pcbBinary, | ||
| DWORD * | pdwSkip, | ||
| DWORD * | pdwFlags | ||
| ) |
Definition at line 1280 of file base64.c.
Referenced by CRYPT_QueryMessageObject(), decodeBase64WithLenFmtW(), and test_CryptStringToBinary().
|
static |
Definition at line 932 of file base64.c.
Referenced by CryptStringToBinaryA().
|
static |
Definition at line 1259 of file base64.c.
Referenced by CryptStringToBinaryW().
Definition at line 696 of file base64.c.
Referenced by Base64ToBinary().
|
static |
Definition at line 908 of file base64.c.
Referenced by CryptStringToBinaryA(), and DecodeAnyA().
|
static |
Definition at line 1235 of file base64.c.
Referenced by CryptStringToBinaryW(), and DecodeAnyW().
Definition at line 981 of file base64.c.
Referenced by string_to_hex(), and test_CryptStringToBinary().
|
static |
Definition at line 88 of file base64.c.
Referenced by BinaryToBase64A().
|
static |
Definition at line 368 of file base64.c.
Referenced by BinaryToBase64W().
|
static |
Definition at line 59 of file base64.c.
Referenced by CryptBinaryToStringA().
|
static |
Definition at line 348 of file base64.c.
Referenced by CryptBinaryToStringW().
Definition at line 948 of file base64.c.
Referenced by string_to_hex(), and test_CryptStringToBinary().
|
static |
Definition at line 991 of file base64.c.
Referenced by string_to_hexA(), string_to_hexW(), and test_CryptStringToBinary().
|
static |
Definition at line 1057 of file base64.c.
Referenced by CryptStringToBinaryA().
|
static |
Definition at line 1275 of file base64.c.
Referenced by CryptStringToBinaryW().
| WINE_DEFAULT_DEBUG_CHANNEL | ( | crypt | ) |
Definition at line 51 of file base64.c.
Referenced by encode_base64(), encodeBase64A(), encodeBase64W(), setpixel_64bppARGB(), and setpixel_64bppPARGB().
Definition at line 43 of file base64.c.
Referenced by Base64WithHeaderAndTrailerToBinaryW().
Definition at line 42 of file base64.c.
Referenced by Base64WithHeaderAndTrailerToBinaryW().
Definition at line 41 of file base64.c.
Referenced by BinaryToBase64W().
Definition at line 46 of file base64.c.
Referenced by BinaryToBase64W().
Definition at line 47 of file base64.c.
Referenced by BinaryToBase64W().
Definition at line 45 of file base64.c.
Referenced by Base64WithHeaderAndTrailerToBinaryW().
Definition at line 44 of file base64.c.
Referenced by BinaryToBase64W().
Definition at line 48 of file base64.c.
Referenced by BinaryToBase64W().