Skip to main content

Generates an arbitrary length base 64 random number.

Project description

base64_random

Generates a base 64 random number of an arbitrary length.

base64_random uses Python's secrets module to generate the random numbers, so you should be able to generate high quality random numbers when using this library. That said, I cannot recommend that this library be used in contexts where high-quality random numbers are used to secure sensitive information. Please use a suitable cryptography library for contexts where you need to protect information.

Please also note, that as of the time of writing, this library provides NO SUPPORT for Base64 encoding or decoding. Additionally, this library generates numbers in base 64, it has no relation to the Base64 encoding format.

Usage

There are two main ways to use this package, command line invocation and importing the module.

Command Line Invocation

Command line usage is quite easy, simply pass the module the length of number you wish to generate:

python -m base64_random 10

Or, by invoking the shell script:

b64r 10

Python module usage

You can also import this module in your code to use it:

from base64_random import gen_random_base64

base64_number = gen_random_base64(10)

print(base64_number)

Installation

base64_random is available on pip!

pip install base64_random

You can also install base64_random directly from git, but please refer to the official documentation for the details of how to do that.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

base64_random-1.0.0.tar.gz (2.7 MB view hashes)

Uploaded Source

Built Distribution

base64_random-1.0.0-py2.py3-none-any.whl (4.4 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page