MCPcopy Create free account
hub / github.com/decoder-it/ADCSCoercePotato / base64Decode

Function base64Decode

HTTPCrossProtocolRelay.cpp:211–222  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

209}
210
211char* base64Decode(char* b64Text, int b64TextLen, int* bufferLen) {
212 *bufferLen = DEFAULT_BUFLEN;
213 char* buffer = (char*)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, *bufferLen);
214
215 if (!CryptStringToBinaryA((LPCSTR)b64Text, b64TextLen, CRYPT_STRING_BASE64, (BYTE*)buffer, (DWORD*)bufferLen, NULL, NULL)) {
216 printf("CryptStringToBinaryA failed with error code %d", GetLastError());
217 HeapFree(GetProcessHeap(), 0, buffer);
218 buffer = NULL;
219 exit(-1);
220 }
221 return buffer;
222}

Callers 1

ExtractType2FromHttpFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected