base65536 | Human-friendly encoding for binary data | Base64 library
kandi X-RAY | base65536 Summary
kandi X-RAY | base65536 Summary
Human-friendly encoding for binary data. Uses the most common (and short) 256 nouns and adjectives, alternating, to encode binary data in a human-friendly format.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Decode decodes a list of nouns .
- main entry point
- Encode encodes a slice of nouns .
- index returns a map from a string
- usage prints the command line flags .
- Error implements the error interface for CorruptInputError
base65536 Key Features
base65536 Examples and Code Snippets
Community Discussions
Trending Discussions on base65536
QUESTION
Before we start, I want to say "hash" is a bit of a misnomer from what I actually want.
Basically, I have a program that returns a 92 character string (this is cryptographically secure) that I want to shorten, which is why I can't think of any other word but I'll need to be able to reverse it.
So I'm looking for some way that I can take the 92 character base64 string (s) and turn it into a much shorter string (n), and then reverse it.
So the encoding would be like (n) + (hash function) = (s)
And then I'll be able to decode it with (s) + (hash function) = (n)
. I don't need this to be secure since I handled that when generating the string.
I was using Base65536 but that was mostly for a quick joke since that would be impractical for an actual user.
TL;DR - I need a hash (or encryption) function that will generate short strings out of long ones.
Just to clarify, I do NOT need to compress the file size, I need a shorter string to return to the user.
...ANSWER
Answered 2018-Mar-08 at 22:49The most space efficient way to store binary data is to store it as bytes. The only way you may get it even shorter is via compression. But for 92 Characters that will not amount to much.
As for Base64: There are cases where we are forced to transmit binary data over a medium not supporting random binary data. Mostly Textbase media (Email, XML files, HTML). So we use Base64 as a way to encode Binary Data. While it is lossless, it is less storage efficient. In effect every Byte of Input needs 1 1/4 byte in Base64 Output. It is never the ideal case to use Base64, more a nessesary evil.
QUESTION
I tried to install the base65536 module, by typing this into Terminal:
pip install base65536
Yet it produced this error:
Collecting base65536 Using cached base65536-0.1.1.tar.gz Requirement already satisfied: six in /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python (from base65536) Installing collected packages: base65536 Running setup.py install for base65536 ... error Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;file='/private/var/folders/2h/n5zk2_w50273k4hdxw8l05240000gn/T/pip-build-tl_DyR/base65536/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /var/folders/2h/n5zk2_w50273k4hdxw8l05240000gn/T/pip-ZZqmm6-record/install-record.txt --single-version-externally-managed --compile: running install running build running build_py creating build creating build/lib creating build/lib/base65536 copying base65536/about.py -> build/lib/base65536 copying base65536/init.py -> build/lib/base65536 copying base65536/core.py -> build/lib/base65536 running install_lib creating /Library/Python/2.7/site-packages/base65536 error: could not create '/Library/Python/2.7/site-packages/base65536': Permission denied
...ANSWER
Answered 2017-Apr-22 at 20:50When it says Permission Denied
that means that you are not an administrator on your computer and therefore cannot do this. Try running as administrator. If you are using windows, right click on app and select 'Run as Administrator'. If you are using mac, and you are not the administrator on your computer, type su (Whatever the name of the admin. user is)
For example, su adminUsername
Then type
pip install base65536
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install base65536
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page