MCPcopy Create free account
hub / github.com/android10/Rust-Cross-Platform-Development / encrypt

Function encrypt

rust-library/cryptor/src/lib.rs:14–16  ·  view source on GitHub ↗

Encrypts a String. Example: ``` use cryptor::encrypt; assert_eq!(encrypt("hello"), "aGVsbG8="); assert_eq!(encrypt(""), ""); ```

(to: &str)

Source from the content-addressed store, hash-verified

12/// assert_eq!(encrypt(""), "");
13/// ```
14pub fn encrypt(to: &str) -> String {
15 base64Engine.encode(String::from(to))
16}
17
18/// Decrypts a String.
19///

Callers 1

test_encrypt_stringFunction · 0.50

Calls

no outgoing calls

Tested by 1

test_encrypt_stringFunction · 0.40