File: ocb-stubs.rs

package info (click to toggle)
rust-nettle-sys 2.3.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 312 kB
  • sloc: ansic: 58; makefile: 4
file content (78 lines) | stat: -rw-r--r-- 1,912 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
// Stubs used when Nettle doesn't support OCB.

#[repr(C)]
pub struct ocb_ctx {}

#[repr(C)]
pub struct ocb_key {}

pub const OCB_BLOCK_SIZE: u32 = 16;
pub const OCB_DIGEST_SIZE: u32 = 16;
pub const OCB_MAX_NONCE_SIZE: u32 = 15;

pub unsafe fn nettle_ocb_decrypt(
    _ctx: *mut ocb_ctx,
    _key: *const ocb_key,
    _encrypt_ctx: *const libc::c_void,
    _encrypt: nettle_cipher_func,
    _decrypt_ctx: *const libc::c_void,
    _decrypt: nettle_cipher_func,
    _length: usize,
    _dst: *mut u8,
    _src: *const u8
) {
    unimplemented!("This version of Nettle does not support the operation");
}

pub unsafe fn nettle_ocb_digest(
    _ctx: *mut ocb_ctx,
    _key: *const ocb_key,
    _cipher: *const libc::c_void,
    _f: nettle_cipher_func,
    _length: usize,
    _digest: *mut u8
) {
    unimplemented!("This version of Nettle does not support the operation");
}

pub unsafe fn nettle_ocb_encrypt(
    _ctx: *mut ocb_ctx,
    _key: *const ocb_key,
    _cipher: *const libc::c_void,
    _f: nettle_cipher_func,
    _length: usize,
    _dst: *mut u8,
    _src: *const u8
) {
    unimplemented!("This version of Nettle does not support the operation");
}

pub unsafe fn nettle_ocb_set_key(
    _key: *mut ocb_key,
    _cipher: *const libc::c_void,
    _f: nettle_cipher_func
) {
    unimplemented!("This version of Nettle does not support the operation");
}

pub unsafe fn nettle_ocb_set_nonce(
    _ctx: *mut ocb_ctx,
    _cipher: *const libc::c_void,
    _f: nettle_cipher_func,
    _tag_length: usize,
    _nonce_length: usize,
    _nonce: *const u8
) {
    unimplemented!("This version of Nettle does not support the operation");
}

pub unsafe fn nettle_ocb_update(
    _ctx: *mut ocb_ctx,
    _key: *const ocb_key,
    _cipher: *const libc::c_void,
    _f: nettle_cipher_func,
    _length: usize,
    _data: *const u8
) {
    unimplemented!("This version of Nettle does not support the operation");
}