/// Sign data using a PIV key
Sign data using a PIV key
Sign data using a PIV key
pub unsafe fn ykpiv_sign_data(
    state: *mut YubiKey,
    raw_in: *const u8,
    in_len: usize,
    sign_out: *mut u8,
    out_len: *mut usize,
    algorithm: u8,
    key: u8,
) -> ErrorKind {
    if state.is_null() {
        return ErrorKind::GenericError;
    }
    if _ykpiv_begin_transaction(state) != ErrorKind::Ok {
        return ErrorKind::PcscError;
    }
    // don't attempt to reselect in crypt operations to avoid problems with PIN_ALWAYS
    let res = _general_authenticate(
        state, raw_in, in_len, sign_out, out_len, algorithm, key, false,
    );
    _ykpiv_end_transaction(state);
    res
}
pub unsafe fn ykpiv_sign_data ( state : * mut YubiKey , raw_in : * const u8 , in_len : usize , sign_out : * mut u8 , out_len : * mut usize , algorithm : u8 , key : u8 , ) -> ErrorKind { if state . is_null ( ) { return ErrorKind :: GenericError ; } if _ykpiv_begin_transaction ( state ) != ErrorKind :: Ok { return ErrorKind :: PcscError ; } // don't attempt to reselect in crypt operations to avoid problems with PIN_ALWAYS let res = _general_authenticate ( state , raw_in , in_len , sign_out , out_len , algorithm , key , false , ) ; _ykpiv_end_transaction ( state ) ; res }
Sign data using a PIV key
Sign data using a PIV key
state
*mut YubiKey
<not_specific>
raw_in
*const u8
<not_specific>
in_len
usize
<not_specific>
sign_out
*mut u8
<not_specific>
out_len
*mut usize
<not_specific>
algorithm
u8
<not_specific>
key
u8
<not_specific>