libcrux_secrets/int/
public_integers.rs1use crate::traits::*;
4pub type I8 = i8;
5pub type U8 = u8;
6pub type I16 = i16;
7pub type U16 = u16;
8pub type I32 = i32;
9pub type U32 = u32;
10pub type I64 = i64;
11pub type U64 = u64;
12#[cfg(not(eurydice))]
13pub type I128 = i128;
14#[cfg(not(eurydice))]
15pub type U128 = u128;
16
17#[inline(always)]
19pub const fn secret<T>(x: T) -> T {
20 x
21}
22
23impl<T> Classify for T {
25 type Classified = T;
26 #[inline(always)]
27 fn classify(self) -> Self {
28 self
29 }
30}
31
32impl<T> Declassify for T {
34 type Declassified = T;
35 #[inline(always)]
36 fn declassify(self) -> T {
37 self
38 }
39}
40
41impl<'a, T> ClassifyRef for &'a T {
43 type ClassifiedRef = &'a T;
44 #[inline(always)]
45 fn classify_ref(self) -> &'a T {
46 self
47 }
48}
49
50impl<'a, T> DeclassifyRef for &'a T {
52 type DeclassifiedRef = &'a T;
53 #[inline(always)]
54 fn declassify_ref(self) -> &'a T {
55 self
56 }
57}
58
59#[inline(always)]
62pub fn classify_mut_slice<T>(x: T) -> T {
63 x
64}
65#[inline(always)]
68pub fn declassify_mut_slice<T>(x: T) -> T {
69 x
70}