Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [base64]

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

2
votes
0answers
19 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 ...
2
votes
1answer
134 views

C++ ASCII To Base64 String Encoding

My Base64 encoder class converts a string with ascii characters to a base64 encoded string with padding if required. Note that I'm not using istream as the input ...
5
votes
2answers
115 views

Python optimized base64 writer for streamed files

I needed to make a base64 file encoder where you can control the read buffer size. This is what I came up with and it's quite fast. It might be able to be simpler but still maintain its performance ...
3
votes
1answer
197 views

Convert hex to base64 (Cryptopals challenge 1)

I've been spending some time learning Rust and I came across the Cryptopals Challenges. This is my implementation of challenge 1 Convert hex to base64 The string: ...
3
votes
1answer
280 views

Base64 string ↔ float array

I need to convert f32 arrays with a fix length to base64 representation and back. My current code looks like this. It works, but it feels way too complicated. How ...
1
vote
1answer
102 views

Base64 iterator adaptor for Rust

As a Rust learning exercise, I'm working on implementing cryptopals challenges using iterators to perform lazy processing of data. For the first challenge, this is a base64 decoder implemented as an ...
4
votes
3answers
3k views
3
votes
0answers
840 views

Send Opencv::Mat image from Qt application to HTML client, using websocket

I wrote an application in C++ using Qt 5.7, basically is a websocket server, using qwebsocket for this, capable to send an image elaborated with OpenCV to an HTML client. In order to do this I encode ...
2
votes
0answers
127 views

Send image between apps

I have an ASP.NET CORE API app and now I have an endpoint like: ...
3
votes
1answer
2k views

Converting to and from Base64 using OpenSSL API

I am trying to get a working and good version of base64 conversions using OpenSSL. My alternatives were an implementation from an answer on SO and Boost (which I didn't chose because I read that is ...
3
votes
1answer
4k views

Encode strings as base64

I have this function I've written to encode strings of binary data as base64 strings. I'd like to see if there are areas where it could be improved, specifically: Is the function correct? Are there ...
7
votes
1answer
2k views

Base64 implementation in C#

I've written the following unsafe C# method to convert a byte array to Base64 encoding. It works, but it runs at a significantly slower rate than the built-in ...
4
votes
1answer
1k views

Hex string to Base64

The base64 decode algorithm is taken directly from Base64 wiki page. This exercise is meant to help me learn Rust, so any pointers in that general direction are very welcome. :) ...
4
votes
1answer
1k views

Convert hex to base64, part 2

Original question Reimplemented solution following JS1's answer. Changed bit string hack to bitwise operations to get the corresponding base64 index values. ...
2
votes
1answer
3k views

Matasano Cryptopals Challenge 1: convert hex to base64

Cryptopals challenge 1 Using binary strings to convert from hex to binary felt kinda hacky. I'd like to hear if there are better ways to do that. I used memcpy() ...
6
votes
2answers
474 views

Unix-to-Unix Encoding (Uuencoding)

Uuencoding is historically used to encode emails. Instructions for creating a Uuencoder are: Start with 3 bytes from the source, 24 bits in total. Split into 4 6-bit groupings, each representing a ...
4
votes
1answer
859 views

Base64 encoder and decoder

I'd like to have some feedback on this small snippet I wrote to implement a base64 encoder and decoder. Specifically, I'm not sure I'm handling padding in the best way possible. ...
8
votes
1answer
146 views

Barcode (Code 128)

I wrote the code below to generate Code 128 barcodes, based on the specs. ...
3
votes
1answer
56 views

Something to store any (standard) data in python

I decided to try make my own way to save normal python data yesterday after coming across the minecraft NBT format, it's more limited than cPickle but appears to produce shorter results and so far ...
4
votes
1answer
127 views

Matasano cryptopals: Conversion to base 64 (with generic types)

My main interest is in how I have handled the generics and if it's idiomatic. I want the user to be able to specify what kind of integer type they would like to use for the encoding (u8, u16, u32, ...
7
votes
2answers
272 views

Base64 encoding implementation

I am learning C and decided to make an implementation of Base64 encoding according to the info Wikipedia provides about it. My main question is: should I declare the index_table array inside the <...
6
votes
2answers
4k views

Java conversion of base 16 to base 64

I wrote a solution in Java to solve the problem here. I use BigInteger to convert first from base 16 to base 10, then base 10 to base 64. This seems quite ...
5
votes
2answers
6k views

PHP Base64 ByteArray Decoder

I have a third party system that submits what I am assuming is a byte array data from OBDII port on our fleet vehicles. I was getting values like: AA== (bool) <...
5
votes
1answer
1k views

Encoding a string into base64

I'm trying to create a simple HTTP client. In order to make one that is standard compliant, I must be able to extract user information from a URI and convert it to base64 and send it via an ...
2
votes
0answers
598 views

Get local Dropbox path with Delphi XE7

I've put together a function in Delphi XE7 which returns the Dropbox directory path on my machine, as this path can be customized by the user. This function currently works on my computer, but it ...
2
votes
1answer
909 views

Generating HMAC

I had been working on several projects that required Header Message Authentication Codes to be generated when brokering files with 3rd parties like Netflix. Unfortunately on older systems like ...
3
votes
1answer
835 views

Convert int64 to custom base64 number string

I want to convert int64 to custom base 64 number string, with this specification: ...
5
votes
2answers
142 views

toBase64 encoder

My code convert text to Base64. I used the algorithm without bit operations. What do you think about my code? ...
1
vote
1answer
304 views

Base64 encoder optimization

Base64 is a widely used encoding mechanism to allow arbitrary binary content to be transferred as printable text. This program is designed to take binary file as input and produce a Base64-encoded ...
5
votes
2answers
923 views

Proper usage of “using” statement in base64 encode method

I used the example on here, but with little changes in order to write a base64 encoder method. I have a few points about the code: I would like to use using ...
0
votes
1answer
2k views

Decrease file size of encrypted file

I am making a Cryptography application and I noticed that the encrypted file is approximately 2 times bigger because I am encoding the files in base64. Are there any file encodings that take less ...
8
votes
2answers
15k views

Checking MIME Type from a base64 string

I've written the following extension to determine the MIME type of a base64 string. It's worked in my local tests, but can anyone point out issues or alternate methods? ...
4
votes
2answers
1k views

Speed optimisation and general tips for base64 encoding/decoding functions in C

So far, the below code appears to work well. It operates pretty fast, but I was wondering if it's possible to make it faster. I'm also looking for general tips on what I might be doing wrong and what ...
2
votes
0answers
1k views

Performance Tuning Base64 encoding

I've been trying to get a relatively optimized version of base64 encoding that works against files. However, I've made several attempts and haven't gotten anything much faster than what I have here. ...
9
votes
2answers
3k views

Base64 encoder/decoder optimizations

I've written a Base64 encoder/decoder, which works great. Now I want to see if I can get it working better. I've optimized as much as I can think of, but it may be missing some things. The encoder can ...
1
vote
1answer
351 views

Perl CGI script to respond to erroneous Base64 image requests

I often get lines like this in my Apache error log: File does not exist: /path/to/www/data:image/gif;base64,R0lGODlhBgAGAIAOAP/yH5BAEACAEALAAAAAAGGAYAAAIJhB0Xi5vOoFwFADs= Obviously, this is due to ...