Skip to main content
The 2024 Developer Survey results are live! See the results

Questions tagged [base64]

Base64 is an encoding scheme (with some variations in the presentation) that represents binary data in an ASCII string format.

5 votes
3 answers
425 views

Bare bones base 64 encoding/decoding

I wrote a bare-bones, no fluff, base 64 library in C. My goal was to make it as small as possible. I'm wondering if there are any further size optimizations I can make (without sacrificing too much ...
Daniel Walker's user avatar
1 vote
1 answer
630 views

Rust - Hexadecimal to Base64 conversion (Cryptopals challenge 1)

Here's my solution to the first challenge of the Cryptopals Crypto Challanges (https://cryptopals.com/sets/1/challenges/1). I decided to use a cargo workspace to structure my project with the library ...
glimapt's user avatar
  • 11
2 votes
1 answer
342 views

Base64 encoder in Assembly x86-64 Linux language

We were asked to create a Base64 encoder for Assembly x86-64 on Linux. Was wondering how my code below could be improved, be it notation or anything else. We only had Assembly for 3 months so I'm not ...
user avatar
7 votes
2 answers
3k views

C code to convert hexadecimal string to base64

I've written a program to convert a hex-encoded string to base64, and here is my code. My main concerns are: Optimizations - Is my code sufficiently optimized and if any more optimization is possible....
Vedant Jadhav's user avatar
1 vote
1 answer
60 views

Function that decodes all values of a given object from Base64

I have function decodeVals in NodeJS that decodes all of the values of the given object from Base64 to ASCII. This is achieved by traversing the values of said ...
Elitezen's user avatar
  • 113
2 votes
1 answer
35 views

SVG hue navigation bar

I've created a navigation spacer bar that has a hue background. To separate different aspects of content it was imported to Inkscape then exported as an SVG. It uses base64 image which I’m not sure is ...
Ryan Stone's user avatar
8 votes
1 answer
330 views

base64 iterators

Was a tiny bit bored reading authentication protocols. Needed to clear the mind and read some base64 encode text. So I implemented these iterators that will encode or decode base64 text. Not sure ...
Loki Astari's user avatar
  • 95.5k
3 votes
2 answers
117 views

Converting a natural number to a permutation matrix in Python. How to speed it up perhaps avoiding messing around with lists, sets and dicts?

It is something a bit complex to explain here, but the code bellow takes a 128-bit number and converts it into a permutation matrix, a beast which I have already faced before. The matrix is ...
dawid's user avatar
  • 173
2 votes
1 answer
7k views

AES-256-CBC encrypt and decrypt files in Python

I wrote a simple algorithm to encrypt and decrypt files in Python using aes-256-cbc. ...
Stageflix's user avatar
0 votes
1 answer
305 views

Cryptopals first challenge - hexadecimal to base64

I've just started the cryptopals-challenge, and now wanted to show my solution to the first challenge here: ...
user avatar
7 votes
1 answer
299 views

base64 encoding and decoding tool

I wanted to understand how base64 encoding (and decoding) works so I implemented this tool in the spirit of "classic UNIX tools" (read from stdin, write to stdout). I'd like to get general feedback ...
MarcoLucidi's user avatar
5 votes
1 answer
3k views

Convert a hex string to base64

I wrote a program that converts a hex-encoded string to base64. It's my solution to the first of the Cryptopals challenges. My main concerns are: Portability. I don't want to rely on implementation-...
flornquake's user avatar
1 vote
1 answer
857 views

Hex string to Base64 in Haskell

This is my take on the first challenge on the cryptopals crypto challenges list. I think that i made it quite simple but i feel like it is possible to optimize it further. Any suggestion? The code: ...
Guilherme Lima's user avatar
7 votes
1 answer
238 views

Bash script to encode images in base64 and generate a CSS file from them

These are the first lines of code I've ever written. I've been interested in the idea of learning to program for quite a while, but never really pulled the trigger, and now I've been playing around ...
typo's user avatar
  • 171
4 votes
0 answers
59 views

Translating Python to Rust: reading a Salesforce ID from a string

As a first project in Rust, I'm translating an existing, working piece of Python code. This code's purpose is to convert a 15-character Salesforce Id (which is guaranteed to be ASCII, exactly 15 bytes ...
David Reed's user avatar

15 30 50 per page