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
#![no_std]
#![doc(
html_logo_url = "https://raw.githubusercontent.com/RustCrypto/media/26acc39f/logo.svg",
html_favicon_url = "https://raw.githubusercontent.com/RustCrypto/media/26acc39f/logo.svg",
html_root_url = "https://docs.rs/kuznyechik/0.8.1"
)]
#![cfg_attr(docsrs, feature(doc_cfg))]
#![warn(missing_docs, rust_2018_idioms)]
#![allow(clippy::needless_range_loop, clippy::transmute_ptr_to_ptr)]
pub use cipher;
use cipher::{
consts::{U16, U32},
generic_array::GenericArray,
};
mod consts;
#[cfg(all(
any(target_arch = "x86_64", target_arch = "x86"),
target_feature = "sse2",
not(kuznyechik_force_soft),
))]
#[path = "sse2/mod.rs"]
mod imp;
#[cfg(not(all(
any(target_arch = "x86_64", target_arch = "x86"),
target_feature = "sse2",
not(kuznyechik_force_soft),
)))]
#[path = "soft/mod.rs"]
mod imp;
pub use imp::{Kuznyechik, KuznyechikDec, KuznyechikEnc};
type BlockSize = U16;
type KeySize = U32;
pub type Block = GenericArray<u8, U16>;
pub type Key = GenericArray<u8, U32>;