(from: *const c_char)
| 13 | /// Decrypts a String. |
| 14 | #[no_mangle] |
| 15 | pub 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)] |
| 23 | mod tests { |
no outgoing calls