Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

rapidrsa

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rapidrsa

Simpler to use implementation of the pycryptodome RSA algorithm

  • 1.0.0
  • PyPI
  • Socket score

Maintainers
1

RapidRSA

Simpler to use implementation of the pycryptodome RSA algorithm



Example Use

from rapidrsa import rsa

rsa = rsa()

e = rsa.encrypt("Example Text")
d = rsa.decrypt(e)
Easily Create and Verify Signatures
from rapidrsa import rsa

rsa = rsa()

e = rsa.encrypt("Example Text")

signature, digest = rsa.create_signature(message)

if rsa.verify_signature(signature, digest):
    d = rsa.decrypt(e)

Required Dependences From PyPi

pycryptodome >= 3.15.0
  • pycryptodome on GitHub

  • pycryptodome on PyPi


Documentation

'''
Classes:
    rsa(key_size=2048, public_key=None, private_key=None)
        Can be fully functional and secure without passing any arguments
Methods:
    keygen(self, key_size: int) -> bytes and bytes
        Generates Keys for Encryption/Decryption. The 'key_size' will determine the security
        and speed of your data (bigger is more secure, but slower)
    encrypt(self, data: str or bytes, public_key=None) -> bytes
        Only requires a public key if you don't want to use the class generated key
    decrypt(self, encrypted_text: bytes, private_key=None) -> str or bytes
        Only requires a private key if you don't want to use the class generated key
    create_signature(self, data: str, private_key=None) -> bytes and object
        Creates a signature for later verifcation that the data hasn't been tampered
        with during transport
    verify_signature(self, signature: bytes, digest: object, public_key=None) -> bool
        Verifies the signature of the data, ensuring the data hasn't been tampered with
    generate_password(self, length=64) -> str
        Generates a random password to share with the client/server for symmetric cryptography
'''

Keywords

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc