MCPcopy Create free account
hub / github.com/TheAlgorithms/Rust / encrypt

Function encrypt

src/ciphers/rsa_cipher.rs:192–194  ·  view source on GitHub ↗

Encrypts a message using the RSA public key # Arguments `message` - The plaintext message (must be less than n) `public_key` - The public key to use for encryption # Returns The encrypted ciphertext # Examples ``` use the_algorithms_rust::ciphers::{generate_keypair, encrypt, decrypt}; let (public_key, private_key) = generate_keypair(61, 53); let message = 65; let ciphertext = encrypt(messag

(message: u64, public_key: &PublicKey)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 4

encrypt_textFunction · 0.70
test_different_primesFunction · 0.70

Calls 1

mod_powFunction · 0.85

Tested by 3

test_different_primesFunction · 0.56