https://github.com/klausmueller1996/base64-encoder
x64 Assembly implementation of base64 encoding
https://github.com/klausmueller1996/base64-encoder
assembly base64 fast windows x64
Last synced: about 1 month ago
JSON representation
x64 Assembly implementation of base64 encoding
- Host: GitHub
- URL: https://github.com/klausmueller1996/base64-encoder
- Owner: KlausMueller1996
- License: apache-2.0
- Created: 2025-03-21T12:57:54.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-04-15T18:21:48.000Z (about 1 year ago)
- Last Synced: 2025-04-27T12:34:07.860Z (about 1 year ago)
- Topics: assembly, base64, fast, windows, x64
- Language: Assembly
- Homepage:
- Size: 28.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Base 64 encoding
## how to build
You need to have Microsoft MASM and C++ Compiler installed.
If you have Visual Studio on your machine open a "x64 native Tools Command Prompt" and enter the following to commands
```
ml64 /c base64_encode.asm base64_decode.asm
cl main.cpp base64_decode.obj base64_encode.obj
```
## how to call
C style function signatures are defined in base64_encoder.h
```
unsigned long base64_encode(const char* plain_input, const unsigned long input_len, char* encoded_output, const unsigned long output_size);
unsigned long base64_decode(const char* encoded_input, const unsigned long input_len, char* plain_output, const unsigned long output_size);
```
Sample code is provided in main.cpp
## implementation details
The algorithm is described in detail at [Wikipedia](https://en.wikipedia.org/wiki/Base64). This implementation uses conversion table from [RFC 4648 �4](https://datatracker.ietf.org/doc/html/rfc4648#section-4).
## remarks
This is my first study of written Assembly code fox x64 architecture. Feel free to comment and give fedback.
This code is testes on Windows 10 and 11, not sure if this also works on Linux?