pub extern "C" fn atms_sign(
    msg_ptr: *const c_char,
    key_ptr: SigningKeyPtr,
    signature_ptr: *mut SignaturePtr,
) -> i64 {
    unsafe {
        if let (Some(ref_key), Some(ref_msg), Some(ref_sig)) =
            (key_ptr.as_ref(), msg_ptr.as_ref(), signature_ptr.as_mut())
        {
            let msg = CStr::from_ptr(ref_msg);
            *ref_sig = Box::into_raw(Box::new(ref_key.sign(msg.to_bytes())));
            return 0;
        }
        NULLPOINTERERR
    }
}
/// Produce a partial signature for message `msg`. The signature, `signature` is computed by hashing
/// `msg` into `G2` and multiplying by the secret key,  `signature = sk * H_2(msg)`.
Produce a partial signature for message `msg`.
Produce a partial signature for message ` msg ` .
pub extern "C" fn atms_sign(
    msg_ptr: *const c_char,
    key_ptr: SigningKeyPtr,
    signature_ptr: *mut SignaturePtr,
) -> i64 {
    unsafe {
        if let (Some(ref_key), Some(ref_msg), Some(ref_sig)) =
            (key_ptr.as_ref(), msg_ptr.as_ref(), signature_ptr.as_mut())
        {
            let msg = CStr::from_ptr(ref_msg);
            *ref_sig = Box::into_raw(Box::new(ref_key.sign(msg.to_bytes())));
            return 0;
        }
        NULLPOINTERERR
    }
}
pub extern " " fn atms_sign ( msg_ptr : * const c_char , key_ptr : SigningKeyPtr , signature_ptr : * mut SignaturePtr , ) -> i64 { unsafe { if let ( Some ( ref_key ) , Some ( ref_msg ) , Some ( ref_sig ) ) = ( key_ptr . as_ref ( ) , msg_ptr . as_ref ( ) , signature_ptr . as_mut ( ) ) { let msg = CStr :: from_ptr ( ref_msg ) ; * ref_sig = Box :: into_raw ( Box :: new ( ref_key . sign ( msg . to_bytes ( ) ) ) ) ; return 0 ; } NULLPOINTERERR } }
Produce a partial signature for message `msg`.
Produce a partial signature for message ` msg ` .
msg_ptr
*const c_char
key_ptr
SigningKeyPtr
signature_ptr
*mut SignaturePtr