(to: *const c_char)
| 4 | /// Encrypts a String. |
| 5 | #[no_mangle] |
| 6 | pub extern "C" fn encrypt(to: *const c_char) -> *mut c_char { |
| 7 | let to = unsafe { CStr::from_ptr(to).to_str().unwrap() }; |
| 8 | let result = cryptor::encrypt(to); |
| 9 | |
| 10 | CString::new(result).unwrap().into_raw() |
| 11 | } |
| 12 | |
| 13 | /// Decrypts a String. |
| 14 | #[no_mangle] |
no outgoing calls