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

Function encrypt_text

src/ciphers/rsa_cipher.rs:243–248  ·  view source on GitHub ↗

Encrypts a text message by converting each character to its ASCII value # Arguments `message` - The plaintext string `public_key` - The public key to use for encryption # Returns A vector of encrypted values, one for each character # Examples ``` use the_algorithms_rust::ciphers::{generate_keypair, encrypt_text, decrypt_text}; let (public, private) = generate_keypair(61, 53); let encrypted

(message: &str, public_key: &PublicKey)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Calls 1

encryptFunction · 0.70

Tested by 3