Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <Windows.h>
- #include "base64.h"
- int main(int argc, char *argv[]) {
- if (argc < 2)
- return 1;
- DWORD dwCipherTextLen = 0;
- LPBYTE lpCipherText = base64_encode(argv[1], strlen(argv[1]), &dwCipherTextLen);
- for (int i = 0; i < dwCipherTextLen; i++)
- printf("%c", lpCipherText[i]);
- puts("");
- DWORD dwPlainTextLen = 0;
- LPBYTE lpPlainText = base64_decode(lpCipherText, dwCipherTextLen, &dwPlainTextLen);
- for (int i = 0; i < dwPlainTextLen; i++)
- printf("%c", lpPlainText[i]);
- puts("");
- free(lpCipherText);
- free(lpPlainText);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement