pub unsafe fn secp256k1_ec_privkey_tweak_add(
        cx: *const Context,
        sk: *mut c_uchar,
        tweak: *const c_uchar,
    ) -> c_int {
        assert!(
            !cx.is_null()
                && (*cx).0 as u32
                    & !(SECP256K1_START_NONE | SECP256K1_START_VERIFY | SECP256K1_START_SIGN)
                    == 0
        );
        if secp256k1_ec_seckey_verify(cx, sk) != 1 {
            return 0;
        }
        ptr::copy(tweak, sk.offset(16), 16);
        *sk.offset(24) = 0x7f; // Ensure sk remains valid no matter what tweak was
        1
    }
/// Copies the first 16 bytes of tweak into the last 16 bytes of sk
Copies the first 16 bytes of tweak into the last 16 bytes of sk
Copies the first 16 bytes of tweak into the last 16 bytes of sk
pub unsafe fn secp256k1_ec_privkey_tweak_add(
        cx: *const Context,
        sk: *mut c_uchar,
        tweak: *const c_uchar,
    ) -> c_int {
        assert!(
            !cx.is_null()
                && (*cx).0 as u32
                    & !(SECP256K1_START_NONE | SECP256K1_START_VERIFY | SECP256K1_START_SIGN)
                    == 0
        );
        if secp256k1_ec_seckey_verify(cx, sk) != 1 {
            return 0;
        }
        ptr::copy(tweak, sk.offset(16), 16);
        *sk.offset(24) = 0x7f; // Ensure sk remains valid no matter what tweak was
        1
    }
pub unsafe fn secp256k1_ec_privkey_tweak_add ( cx : * const Context , sk : * mut c_uchar , tweak : * const c_uchar , ) -> c_int { assert ! ( cx is_null ( ) ( cx ) 0 as u32 ( SECP256K1_START_NONE SECP256K1_START_VERIFY SECP256K1_START_SIGN ) 0 ) ; if secp256k1_ec_seckey_verify ( cx , sk ) != 1 { return 0 ; } ptr :: copy ( tweak , sk . offset ( 16 ) , 16 ) ; * sk . offset ( 24 ) = 0x7f ; // Ensure sk remains valid no matter what tweak was 1 }
Copies the first 16 bytes of tweak into the last 16 bytes of sk
Copies the first 16 bytes of tweak into the last 16 bytes of sk
cx
*const Context
sk
*mut c_uchar
tweak
*const c_uchar
cx
*const Context
sk
*mut c_uchar
tweak
*const c_uchar