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

Function decrypt

rust-library/cryptor_c/src/lib.rs:15–20  ·  view source on GitHub ↗
(from: *const c_char)

Source from the content-addressed store, hash-verified

13/// Decrypts a String.
14#[no_mangle]
15pub extern "C" fn decrypt(from: *const c_char) -> *mut c_char {
16 let from = unsafe { CStr::from_ptr(from).to_str().unwrap() };
17 let result = cryptor::decrypt(from);
18
19 CString::new(result).unwrap().into_raw()
20}
21
22#[cfg(test)]
23mod tests {

Calls

no outgoing calls

Tested by 1

test_decrypt_stringFunction · 0.56