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
// Copyright (C) 2023 Fabian Moos
// This file is part of encodex.
//
// encodex is free software: you can redistribute it and/or modify it under the terms of the GNU
// General Public License as published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// encodex is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
// even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// General Public License for more details.
//
// You should have received a copy of the GNU General Public License along with encodex. If not,
// see <https://www.gnu.org/licenses/>.
//
//! All implemented codes.
//!
//! Codes do not allow for encryption. A coding is just a translation from one byte stream into a
//! different one without any additional credentials. For abstractions sake the first byte stream is
//! also called a `plaintext` and the second byte stream is also called a `ciphertext` throughout
//! this documentation, although these words are usually reserved for ciphers. But everybody who
//! knows the algorithm that has been used to perform the translation can restore the plaintext from
//! the ciphertext.
//!
//! That means that codes, in contrast to ciphers, do not supply confidentiality.
//!
//! More information about a specific code can be found in their respective module's documentation.
use ;
/// Trait for codes.
///
/// Every code in this crate implements this trait. That ensures that all codes can be treated in a
/// generic way.
/// Trait for the decode operation of a [`Code`] object.
/// Trait for the encode operation of a [`Code`] object.