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 details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

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

Uploaded Python 2Python 3

File details

Details for the file base64_random-1.0.0.tar.gz.

File metadata

  • Download URL: base64_random-1.0.0.tar.gz
  • Upload date:
  • Size: 2.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.2

File hashes

Hashes for base64_random-1.0.0.tar.gz
Algorithm Hash digest
SHA256 a9b84298a40d39221c4000474f68875669907609352cbc9d256f6f0e878802ab
MD5 c022bf0e69c8b9d5b0f95e7b9f07001e
BLAKE2b-256 42bf63e1424db68cf158b2d4f8c5a405bfab07ab529c592b07db1c0cf9b696bd

See more details on using hashes here.

File details

Details for the file base64_random-1.0.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for base64_random-1.0.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 6da760ab92e85319de50e29b6ccc355b539b78107ee276e988f46277fb71887b
MD5 3b11d7c151f8f8733c57753e0191aa7f
BLAKE2b-256 2a61e39074ac9e8f50343f04679bf69c4b57491b459e19fa8d1d23c517a3fbce

See more details on using hashes here.

Supported by

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