pub struct Rijndael_Generic<const ROUND: usize = 10, const NB: usize = 4, const NK: usize = 4, const IRREDUCIBLE: u8 = 27, const AFFINE_MUL: u64 = 17905254523795399665, const AFFINE_ADD: u8 = 99, const SR0: usize = 0, const SR1: usize = 1, const SR2: usize = 2, const SR3: usize = 3, const MC00: u8 = 2, const MC01: u8 = 3, const MC02: u8 = 1, const MC03: u8 = 1, const MC10: u8 = 1, const MC11: u8 = 2, const MC12: u8 = 3, const MC13: u8 = 1, const MC20: u8 = 1, const MC21: u8 = 1, const MC22: u8 = 2, const MC23: u8 = 3, const MC30: u8 = 3, const MC31: u8 = 1, const MC32: u8 = 1, const MC33: u8 = 2, const RC0: u32 = 1, const RC1: u32 = 2, const RC2: u32 = 4, const RC3: u32 = 8, const RC4: u32 = 16, const RC5: u32 = 32, const RC6: u32 = 64, const RC7: u32 = 128, const RC8: u32 = 27, const RC9: u32 = 54, const ROT: u32 = 1> { /* private fields */ }Expand description
A Rijndael or AES (Advanced Encryption Standard) symmetric-key algorithm for the encryption of digital data
§Note
This descryption about Rijndael is according to little endianness. MSB (Most Significant Bit) is the 64th bit and LSB (Least Significant Bit) is the first bit in this descryption unless otherwise mentioned.
§Introduction
The name, AES, is the acronym of Advanced Encryption Standard. The name, Rijndael, is created out of the names of the Belgian cryptographers, Joan Daemen and Vincent Rijmen. Rijndael means Rhine valley in Dutch though it is not known whether the name Rijndael was made with that intention. AES is the subset of Rijndael. AES has three versions: AES-128, AES-192 and AES-256. All of them have the 128-bit data block. AES-128 has the 128-bit key length. AES-192 has the 192-bit key length. AES-256 has the 256-bit key length. On the other hand, Rijndael has nine versions: Rijndael-128-128, Rijndael-128-192, Rijndael-128-256, Rijndael-192-128, Rijndael-192-192, Rijndael-192-256, Rijndael-256-128, Rijndael-256-192, and Rijndael-256-256. Rijndael-128-, Rijndael-192-, and Rijndael-256-* have 128-bit data block, 192-bit data block, and 256-bit data block, respectively. Rijndael--128, Rijndael--192, and Rijndael-*-256 have 128-bit key length, 192-bit key length, and 256-bit key length, respectively. However, this module, Rijndael_Generic provides more expanded versions such as 32-bit and 64-bit data blocks and key lengths and more than 256-bit data blocks and key lengths.
§Short History of birth of AES
On 2nd, January, 1997, NIST announced that they wished to choose the
encryption algorithm standard in replacement of DES, which is called AES.
The contest held three rounds. At the first round, fifteen were submitted:
CAST-256, CRYPTON, DEAL, DFC, E2, FROG, HPC, LOKI97, MAGENTA, MARS, RC6,
Rijndael, SAFER+, Serpent, and Twofish. At the second round, five remained:
MARS, RC6, Rijndael, Serpent, and Twofish. At the third round, Rijndael was
chosen out of the remained five. However, all the five algorithms are
commonly referred to as “AES finalists”, and they are also considered
well-known and respected in the community. So, the other four algorithms
are also being actively used as well as Rijndael, today.
§Use of AES or Rijndael and its variants
This algorithm is implemented generic way. Most of the constants are implemented as generic constants. So, without changing any line of code, you can change the algorithm by changing the generic parameter. You can design and implement your own algorithm based on Rijndael which uses SPN (Substitution–Permutation Network). You can also use the the source code of Rijndael_Generic in order to find the weakness of SPN.
§Generic Parameters
You can change the generic parameters if you want to make your own encryption/decryption algorithm based on Rijndael. However, your own algorithm may or may not be securer than AES. It is a high chance that your own algorithm is less secure than AES unless you have performed the security test for your own algorithm and proved that your algorithm is at least as secure as AES.
-
ROUND: Indicates the number of rounds. You can change how many times the Substitution-Permutation Network will be repeated. Its minimum value is 0. Original Rijndael has the number of rounds as follows:
data \ key 128-bit key 192-bit key 256-bit key 128-bit data 10 rounds 12 rounds 14 rounds 192-bit data 12 rounds 12 rounds 14 rounds 256-bit data 14 rounds 14 rounds 14 rounds The default of
ROUNDis 10. The default value10is for AES-128 which is most frequently used. -
NB: Indicates the size of block. The block size is (
NB* 4) bytes. You can change the size of block by changing the valueNB. The default value ofNBis4. The default value4is for AES which is most frequently used. IfNBis0, the behavior is not defined. -
NK: Indicates the size of key. The key size is (
NK* 4) bytes. You can change the size of Key by changing the valueNK. The default value ofNKis4. The default value4is for AES-128 which is most frequently used. IfNKis0, the behavior is not defined. -
IRREDUCIBLE: Indicates the irreducible polynomial. You can change the irreducible polynomial by changing
IRREDUCIBLE. The default value ofIRREDUCIBLEis0b_0001_1011which means x^8 + x^4 + x^3 + x + 1. InIRREDUCIBLE, the termx^8is always omitted. The default value0b_0001_1011is for Rijndael or AES. -
AFFINE_MUL: Indicates the two-dimensional matrix that is used to make S-Box.
AFFINE_MULis the linear part of the affine transformation. You can change the S-Box by changingAFFINE_MULwithAFFINE_ADDalong. The default value ofAFFINE_MULis0b_11111000_01111100_00111110_00011111_10001111_11000111_11100011_11110001which means the matrix as follows.Matrix 1 1 1 1 1 0 0 0 0 1 1 1 1 1 0 0 0 0 1 1 1 1 1 0 0 0 0 1 1 1 1 1 1 0 0 0 1 1 1 1 1 1 0 0 0 1 1 1 1 1 1 0 0 0 1 1 1 1 1 1 0 0 0 1 The default value of
AFFINE_MULis for Rijndael or AES. -
AFFINE_ADD: Indicates the one-dimensional matrix that is used to make S-Box.
AFFINE_ADDis the non-linear part of the affine transformation. You can change the S-Box by changingAFFINE_ADDwithAFFINE_MULalong. The default value ofAFFINE_ADDis0b_01100011which means the matrix as follows.Matrix 0 1 1 0 0 0 1 1 The default value of
AFFINE_ADDis for Rijndael or AES. -
SR0 ~ SR3: Indicates how many bytes to shift (rotate) in each row in ShiftRows step. You can change the amounts of shifting (rotating) in each row by changing
SR0,SR1,SR2, andSR3. The default values ofSR0,SR1,SR2, andSR3are0,1,2, and3, respectively. The default values0,1,2, and3are for Rijndael or AES. -
MC00 ~ MC33: Indicates the two-dimensional matrix that is used as MixColumns matrix in MixColumn step.
MC00,MC01,MC02,MC03,MC10,MC11,MC12,MC13,MC20,MC21,MC22,MC23,MC30,MC31,MC32, andMC33are the elements of the two-dimensional MixColumns matrix. You can change the MixColumns matrix to change the MixColumn step by changingMC00~MC33. The default values ofMC00,MC01,MC02,MC03,MC10,MC11,MC12,MC13,MC20,MC21,MC22,MC23,MC30,MC31,MC32, andMC33are2,3,1,1,1,2,3,1,1,1,2,3,3,1,1, and2, respectively, which means the matrix as follows.Matrix 2 3 1 1 1 2 3 1 1 1 2 3 3 1 1 2 The default values of
MC00~MC33are for Rijndael or AES. -
RC0 ~ RC9: Indicates Round Constants that are used to make round keys. The round keys are used in the AddRoundKey step. You can change the round keys by changing
RC0~RC9. The default values ofRC0,RC1,RC2,RC3,RC4,RC5,RC6,RC7,RC8, andRC9are0b_0000_0001,0b_0000_0010,0b_0000_0100,0b_0000_1000,0b_0001_0000,0b_0010_0000,0b_0100_0000,0b_1000_0000,0b_0001_1011, and0b_001_10110, respectively. The default values are for Rijndael or AES. IfRoundis greater than 10, the round constants after RC9 will be determined by multiplying previous round constant by2on Galois Field. So, So-called RC10 is double ofRC9on Galois Field and RC11 is double ofRC10on Galois Field, and so on. -
ROT: Indicates how may bytes to shift (rotate) in making round keys. You can change round keys by changing
ROT. The default value ofROTis1. The default value1is for for Rijndael or AES.
§Reference
Read more about AES in brief. Watch this video and then this video in series for more (or deeper or full) understanding of AES.
§Quick Start
You have to import (use) one of the modules: AES_128, AES_192, and
AES_256 in order to use official AES as shown in Example 1. And, in the
same way you can import (use) the modules:
Rijndael_128_128, Rijndael_128_192, Rijndael_128_256,
Rijndael_128_384, Rijndael_128_512,
Rijndael_192_128, Rijndael_192_192, Rijndael_192_256,
Rijndael_192_384, Rijndael_192_512,
Rijndael_256_128, Rijndael_256_192, Rijndael_256_256,
Rijndael_256_384, Rijndael_256_512,
Rijndael_384_128, Rijndael_384_192, Rijndael_384_256,
Rijndael_384_384, Rijndael_384_512,
Rijndael_512_128, Rijndael_512_192, Rijndael_512_256,
Rijndael_512_384, and Rijndael_512_512.
Of course, you can also expand Rijndael by changing the generic parameters.
Also, there are some predefined modules:
Rijndael_32_32 for 32 bit key and 32-bit encryption data, and
Rijndael_64_64 for 64 bit key and 64-bit encryption data for educational
purpose, though they are not very practical.
§Example 1
use cryptocol::symmetric::AES_128;
use cryptocol::symmetric::AES_192;
use cryptocol::symmetric::AES_256;
use cryptocol::symmetric::Rijndael_128_128;
use cryptocol::symmetric::Rijndael_128_192;
use cryptocol::symmetric::Rijndael_128_256;
use cryptocol::symmetric::Rijndael_128_384;
use cryptocol::symmetric::Rijndael_128_512;
use cryptocol::symmetric::Rijndael_192_128;
use cryptocol::symmetric::Rijndael_192_192;
use cryptocol::symmetric::Rijndael_192_256;
use cryptocol::symmetric::Rijndael_192_384;
use cryptocol::symmetric::Rijndael_192_512;
use cryptocol::symmetric::Rijndael_256_128;
use cryptocol::symmetric::Rijndael_256_192;
use cryptocol::symmetric::Rijndael_256_256;
use cryptocol::symmetric::Rijndael_256_384;
use cryptocol::symmetric::Rijndael_256_512;
use cryptocol::symmetric::Rijndael_384_128;
use cryptocol::symmetric::Rijndael_384_192;
use cryptocol::symmetric::Rijndael_384_256;
use cryptocol::symmetric::Rijndael_384_384;
use cryptocol::symmetric::Rijndael_384_512;
use cryptocol::symmetric::Rijndael_512_128;
use cryptocol::symmetric::Rijndael_512_192;
use cryptocol::symmetric::Rijndael_512_256;
use cryptocol::symmetric::Rijndael_512_384;
use cryptocol::symmetric::Rijndael_512_512;
use cryptocol::symmetric::Rijndael_64_64;
use cryptocol::symmetric::Rijndael_32_32;You can instantiate the AES object with u128 key as Example 2.
In this case, you have to take endianness into account.
In little-endianness, 0x_1234567890ABCDEF1234567890ABCDEF_u128 is [0xEFu8,
0xCDu8, 0xABu8, 0x90u8, 0x78u8, 0x56u8, 0x34u8, 0x12u8, 0xEFu8, 0xCDu8,
0xABu8, 0x90u8, 0x78u8, 0x56u8, 0x34u8, 0x12u8] while the same
0x_1234567890ABCDEF1234567890ABCDEF_u128 is [0x12u8, 0x34u8, 0x56u8, 0x78u8,
0x90u8, 0xABu8, 0xCDu8, 0xEF_u64, 0x12u8, 0x34u8, 0x56u8, 0x78u8, 0x90u8,
0xABu8, 0xCDu8, 0xEF_u64] in big-endianness.
The instantiated object should be mutable.
§Example 2
use cryptocol::symmetric::AES_128;
let key = 0x_1234567890ABCDEF1234567890ABCDEF_u128;
let mut _a_aes = AES_128::new_with_key_u128(key);Note that the object should be intantiated as mutable object.
Also, you can instantiate the AES object with [u8; 16] key as shown in
Example 3. In this case, you don’t have to take endianness into account.
The instantiated object should be mutable.
§Example 3
use cryptocol::symmetric::AES_128;
let key = [0xEFu8, 0xCD, 0xAB, 0x90, 0x78, 0x56, 0x34, 0x12, 0xEF, 0xCD, 0xAB, 0x90, 0x78, 0x56, 0x34, 0x12];
let mut _a_aes = AES_128::new_with_key(&key);You can instantiate the AES object without key and set a u128 key later as
shown in Example 4 or a [u8; 16] key later as shown in Example 5.
§Example 4
use cryptocol::symmetric::AES_128;
let mut a_aes = AES_128::new();
let key = 0x_1234567890ABCDEF1234567890ABCDEF_u128;
a_aes.set_key_u128(key);§Example 5
use cryptocol::symmetric::AES_128;
let mut a_aes = AES_128::new();
let key = [0xEFu8, 0xCD, 0xAB, 0x90, 0x78, 0x56, 0x34, 0x12, 0xEF, 0xCD, 0xAB, 0x90, 0x78, 0x56, 0x34, 0x12];
a_aes.set_key(&key);Now, you can freely use any operation mode. This crate provide ECB (Electronic CodeBook), CBC(Cipher Block Chaining), PCBC (Propagation Cipher Block Chaining), CFB (Cipher FeedBack) OFB (Output FeedBack), and CTR (CounTeR). You can choose the way of padding bits according to either PKCS #7 or ISO 7816-4. So, you can import (use) one of the following traits: ECB_PKCS7, ECB_ISO, CBC_PKCS7, CBC_ISO, PCBC_PKCS7, PCBC_ISO, CFB, OFB, and CTR. The following example 6 shows the case that you choose CBC operation mode and padding bits according to PKCS #7.
§Example 6
use std::io::Write;
use std::fmt::Write as _;
use cryptocol::symmetric::{ AES_128, CBC_PKCS7 };
let mut a_aes = AES_128::new_with_key(&[0xEFu8, 0xCD, 0xAB, 0x90, 0x78, 0x56, 0x34, 0x12, 0xEF, 0xCD, 0xAB, 0x90, 0x78, 0x56, 0x34, 0x12]);
let message = "In the beginning God created the heavens and the earth.";
println!("M =\t{}", message);
let iv = [0x87654321_u32, 0xFEDCBA09_u32, 0x87654321_u32, 0xFEDCBA09_u32];
println!("IV =\t{:08X}{:08X}{:08X}{:08X}", iv[0].to_be(), iv[1].to_be(), iv[2].to_be(), iv[3].to_be());
let mut cipher = Vec::<u8>::new();
a_aes.encrypt_str_into_vec(iv, message, &mut cipher);
print!("C =\t");
for c in cipher.clone()
{ print!("{:02X} ", c); }
println!();
let mut txt = String::new();
for c in cipher.clone()
{ write!(txt, "{:02X} ", c); }
assert_eq!(txt, "C9 1C 27 CE 83 92 A1 CF 7D A4 64 35 16 48 01 72 CC E3 6D CD BB 19 FC D0 80 22 09 9F 23 32 73 27 58 37 F9 9B 3C 44 7B 03 B3 80 7E 99 DF 97 4E E9 A3 89 67 0C 21 29 3E 4D DC AD B6 44 09 D4 3B 02 ");
let mut recovered = String::new();
a_aes.decrypt_vec_into_string(iv, &cipher, &mut recovered);
println!("B =\t{}", recovered);
assert_eq!(recovered, "In the beginning God created the heavens and the earth.");
assert_eq!(recovered, message);
println!();You can modify the Rijndael encryption/decryption algorithm as you want. All the constants are implemented as generic parameters. For instance, you can change S-box, the number of rounds of Substitution - Permutation network, the irreducible polynormial, key length, etc. The following Example 7 shows the variation of Rijndael which has 512-bit data block and 512-bit key.
§Example 7
use std::io::Write;
use std::fmt::Write as _;
use cryptocol::symmetric::{ Rijndael_Generic, CBC_PKCS7 };
let mut a_rijndael = Rijndael_Generic::<22, 16, 16>::new_with_key(&[0xEFu8, 0xCD, 0xAB, 0x90, 0x78, 0x56, 0x34, 0x12, 0xEF, 0xCD, 0xAB, 0x90, 0x78, 0x56, 0x34, 0x12, 0xEF, 0xCD, 0xAB, 0x90, 0x78, 0x56, 0x34, 0x12, 0xEF, 0xCD, 0xAB, 0x90, 0x78, 0x56, 0x34, 0x12, 0xEF, 0xCD, 0xAB, 0x90, 0x78, 0x56, 0x34, 0x12, 0xEF, 0xCD, 0xAB, 0x90, 0x78, 0x56, 0x34, 0x12, 0xEF, 0xCD, 0xAB, 0x90, 0x78, 0x56, 0x34, 0x12, 0xEF, 0xCD, 0xAB, 0x90, 0x78, 0x56, 0x34, 0x12]);
let message = "In the beginning God created the heavens and the earth.";
println!("M =\t{}", message);
let iv = [0x_FEDCBA09_u32, 87654321_u32, 0x_FEDCBA09_u32, 87654321_u32, 0x_FEDCBA09_u32, 87654321_u32, 0x_FEDCBA09_u32, 87654321_u32, 0x_FEDCBA09_u32, 87654321_u32, 0x_FEDCBA09_u32, 87654321_u32, 0x_FEDCBA09_u32, 87654321_u32, 0x_FEDCBA09_u32, 87654321_u32];
println!("IV =\t{:08X}{:08X}{:08X}{:08X}", iv[0].to_be(), iv[1].to_be(), iv[2].to_be(), iv[3].to_be());
let mut cipher = Vec::<u8>::new();
a_rijndael.encrypt_str_into_vec(iv, message, &mut cipher);
print!("C =\t");
for c in cipher.clone()
{ print!("{:02X} ", c); }
println!();
let mut txt = String::new();
for c in cipher.clone()
{ write!(txt, "{:02X} ", c); }
assert_eq!(txt, "B1 C0 1F 84 17 46 35 12 D9 16 52 44 5F 40 A1 7F 3B 55 F7 E6 42 E5 1F 42 57 43 AD E4 00 19 54 1D B6 F3 1B 20 C8 D3 08 92 B7 C4 0C E2 77 73 A5 E4 0D E7 0F F4 B0 38 FE 78 30 56 E4 A7 9E CE 0E 50 ");
let mut recovered = String::new();
a_rijndael.decrypt_vec_into_string(iv, &cipher, &mut recovered);
println!("B =\t{}", recovered);
assert_eq!(recovered, "In the beginning God created the heavens and the earth.");
assert_eq!(recovered, message);You can use Rijndael_512_512 as one of post-Quantum algorithms for a while because even Grover algorithm takes long enough to break Rijndael_512_512. Its key is 512-bit and its encryption block is 512-bit.
§Example 8 for Post-Quantum
use std::io::Write;
use std::fmt::Write as _;
use cryptocol::number::SharedArrays;
use cryptocol::hash::SHA3_512;
use cryptocol::symmetric::{ Rijndael_512_512, CBC_ISO };
let mut sha3 = SHA3_512::new();
sha3.absorb_str("Post-Quantum");
let key: [u8; 64] = sha3.get_hash_value_in_array();
print!("K =\t");
for i in 0..64
{ print!("{:02X}", key[i]); }
println!();
let mut a_rijndael = Rijndael_512_512::new_with_key(&key);
sha3.absorb_str("Initialize");
let mut iv = SharedArrays::<u32, 16, u8, 64>::new();
iv.src = sha3.get_hash_value_in_array();
let iv = unsafe { iv.des };
print!("IV =\t");
for i in 0..16
{ print!("{:08X}", iv[i].to_be()); }
println!();
let message = "In the beginning God created the heavens and the earth.";
println!("M =\t{}", message);
let mut cipher = [0_u8; 64];
a_rijndael.encrypt(iv.clone(), message.as_ptr(), message.len() as u64, cipher.as_mut_ptr());
print!("C =\t");
for c in cipher.clone()
{ print!("{:02X} ", c); }
println!();
let mut txt = String::new();
for c in cipher.clone()
{ write!(txt, "{:02X} ", c); }
assert_eq!(txt, "C2 C4 1C 91 EE 50 F0 04 B6 73 00 B2 81 05 01 25 C1 87 24 27 7E CE 01 65 C5 CB 87 38 99 9F 5B 0C D1 DF 8D 52 C4 C4 C8 D8 F5 D5 AD F3 FD DA 35 C2 33 F6 5D 83 02 85 F1 20 8C 56 0B 72 9C 91 84 42 ");
let mut recovered = vec![0; 55];
a_rijndael.decrypt(iv, cipher.as_ptr(), cipher.len() as u64, recovered.as_mut_ptr());
print!("Ba =\t");
for b in recovered.clone()
{ print!("{:02X} ", b); }
println!();
let mut txt = String::new();
for c in recovered.clone()
{ write!(txt, "{:02X} ", c); }
assert_eq!(txt, "49 6E 20 74 68 65 20 62 65 67 69 6E 6E 69 6E 67 20 47 6F 64 20 63 72 65 61 74 65 64 20 74 68 65 20 68 65 61 76 65 6E 73 20 61 6E 64 20 74 68 65 20 65 61 72 74 68 2E ");
let mut converted = String::new();
unsafe { converted.as_mut_vec() }.append(&mut recovered);
println!("Bb =\t{}", converted);
assert_eq!(converted, "In the beginning God created the heavens and the earth.");
assert_eq!(converted, message);§Notice for Practical Use
Now, you can freely use any methods with any paddings in any operation modes.
- This crate provides six operation modes: ECB, CBC, PCBC, CFB, OFB, and CTR.
- This crate provides two padding ways: ISO 7816-4 and PKCS #7.
- The operation modes ECB, CBC and PCBC requires padding bytes.
- You can combine three operation modes and two padding ways.
- The operation modes
CFB,OFB, andCTRdoes not require padding bytes. - The traits that implements combination of operation modes and padding
ways are provided such as
ECB_PKCS7,ECB_ISO,CBC_PKCS7,CBC_ISO,PCBC_PKCS7, andPCBC_ISO. - You can find detaild instructions and their helpful examples if you go through those links.
In summary,
Implementations§
Source§impl<const ROUND: usize, const NB: usize, const NK: usize, const IRREDUCIBLE: u8, const AFFINE_MUL: u64, const AFFINE_ADD: u8, const SR0: usize, const SR1: usize, const SR2: usize, const SR3: usize, const MC00: u8, const MC01: u8, const MC02: u8, const MC03: u8, const MC10: u8, const MC11: u8, const MC12: u8, const MC13: u8, const MC20: u8, const MC21: u8, const MC22: u8, const MC23: u8, const MC30: u8, const MC31: u8, const MC32: u8, const MC33: u8, const RC0: u32, const RC1: u32, const RC2: u32, const RC3: u32, const RC4: u32, const RC5: u32, const RC6: u32, const RC7: u32, const RC8: u32, const RC9: u32, const ROT: u32> Rijndael_Generic<ROUND, NB, NK, IRREDUCIBLE, AFFINE_MUL, AFFINE_ADD, SR0, SR1, SR2, SR3, MC00, MC01, MC02, MC03, MC10, MC11, MC12, MC13, MC20, MC21, MC22, MC23, MC30, MC31, MC32, MC33, RC0, RC1, RC2, RC3, RC4, RC5, RC6, RC7, RC8, RC9, ROT>
impl<const ROUND: usize, const NB: usize, const NK: usize, const IRREDUCIBLE: u8, const AFFINE_MUL: u64, const AFFINE_ADD: u8, const SR0: usize, const SR1: usize, const SR2: usize, const SR3: usize, const MC00: u8, const MC01: u8, const MC02: u8, const MC03: u8, const MC10: u8, const MC11: u8, const MC12: u8, const MC13: u8, const MC20: u8, const MC21: u8, const MC22: u8, const MC23: u8, const MC30: u8, const MC31: u8, const MC32: u8, const MC33: u8, const RC0: u32, const RC1: u32, const RC2: u32, const RC3: u32, const RC4: u32, const RC5: u32, const RC6: u32, const RC7: u32, const RC8: u32, const RC9: u32, const ROT: u32> Rijndael_Generic<ROUND, NB, NK, IRREDUCIBLE, AFFINE_MUL, AFFINE_ADD, SR0, SR1, SR2, SR3, MC00, MC01, MC02, MC03, MC10, MC11, MC12, MC13, MC20, MC21, MC22, MC23, MC30, MC31, MC32, MC33, RC0, RC1, RC2, RC3, RC4, RC5, RC6, RC7, RC8, RC9, ROT>
Sourcepub fn new() -> Self
pub fn new() -> Self
Constructs a new object Rijndael_Generic.
§Features
- In order to encrypt data, object should be instantiated mutable.
- This method sets the key to have all bits zeros.
- The default key which has all bits zeros is not a weak key unlike DES.
§Example 1
use cryptocol::symmetric::AES_128;
let mut _a_aes = AES_128::new();
let plaintext = 0x1234567890ABCDEF1234567890ABCDEF_u128;
let ciphertext = _a_aes.encrypt_u128(plaintext);
println!("Plaintext:\t\t{:#032X}", plaintext);
println!("Ciphertext:\t\t{:#032X}", ciphertext);
assert_eq!(ciphertext, 0xE2C8CD3BFD4D72366A4806B100659867);
let recovered_cipher_text = _a_aes.decrypt_u128(ciphertext);
println!("Recovered-ciphertext:\t{:#032X}", recovered_cipher_text);
assert_eq!(recovered_cipher_text, 0x1234567890ABCDEF1234567890ABCDEF_u128);
assert_eq!(recovered_cipher_text, plaintext);§For more examples,
click here
Sourcepub fn box_new() -> Box<Self>
pub fn box_new() -> Box<Self>
Constructs a new object Rijndael_Generic wrapped by Box.
§Features
- In order to encrypt data, object should be instantiated mutable.
- This method sets the key to have all bits zeros.
- The default key which has all bits zeros is not a weak key unlike DES.
§Example 1
use cryptocol::symmetric::AES_128;
let mut _a_aes = AES_128::box_new();
let plaintext = 0x1234567890ABCDEF1234567890ABCDEF_u128;
let ciphertext = _a_aes.encrypt_u128(plaintext);
println!("Plaintext:\t\t{:#032X}", plaintext);
println!("Ciphertext:\t\t{:#032X}", ciphertext);
assert_eq!(ciphertext, 0xE2C8CD3BFD4D72366A4806B100659867);
let recovered_cipher_text = _a_aes.decrypt_u128(ciphertext);
println!("Recovered-ciphertext:\t{:#032X}", recovered_cipher_text);
assert_eq!(recovered_cipher_text, 0x1234567890ABCDEF1234567890ABCDEF_u128);
assert_eq!(recovered_cipher_text, plaintext);§For more examples,
click here
Sourcepub fn new_with_key<const K: usize>(key: &[u8; K]) -> Self
pub fn new_with_key<const K: usize>(key: &[u8; K]) -> Self
Constructs a new object Rijndael_Generic.
§Arguments
- The argument
keyis the array of u8 that hasKelements.
§Features
- This method sets the key to be the given argument
key. - If
Kis less than4 * NK, the rest bits of the key to be set afterKbits will be set to bezero. - If
Kis greater than4 * NK, the rest bits after4 * NKbits of the key given as the argument will be ignored.
§Example 1 for normal case
use cryptocol::symmetric::AES_128;
let mut aes = AES_128::new_with_key(&[0x12, 0x34, 0x56, 0x78, 0x90, 0xAB, 0xCD, 0xEF, 0x12, 0x34, 0x56, 0x78, 0x90, 0xAB, 0xCD, 0xEF]);
let plaintext = 0x1234567890ABCDEF1234567890ABCDEF_u128;
let ciphertext = aes.encrypt_u128(plaintext);
println!("Plaintext:\t\t{:#034X}", plaintext);
println!("Ciphertext:\t\t{:#034X}", ciphertext);
assert_eq!(ciphertext, 0x01CCF8264AECB5D644E2BAE927584D87_u128);
let cipher_cipher_text = aes.encrypt_u128(ciphertext);
println!("Recovered-ciphertext:\t{:#034X}", recovered_cipher_text);
assert_eq!(recovered_cipher_text, 0x1234567890ABCDEF1234567890ABCDEF_u128);
assert_eq!(recovered_cipher_text, plaintext);§For more examples,
click here
Sourcepub fn new_with_key_u128(key: u128) -> Self
pub fn new_with_key_u128(key: u128) -> Self
Constructs a new object Rijndael_Generic.
§Arguments
- The argument
keyis ofu128. - It should be in the same endianness of machine. For example,
if the intended key is [0x12, 0x34, 0x56, 0x78, 0x90, 0xAB, 0xCD,
0xEF, 0x12, 0x34, 0x56, 0x78, 0x90, 0xAB, 0xCD, 0xEF], the key in
u128for this argument is 0x_1234567890ABCDEF1234567890ABCDEF_u128 for big-endian machine, and the key inu128for this argument is 0x_EFCDAB9078563412EFCDAB9078563412_u128 for little-endian machine.
§Features
- This method sets the key to be the given argument
key. - If
NKis less than4, the rest bits at the address higher than4 * NK * 8bits of the key given as the argument will be ignored. - If
NKis greater than4, the rest bits of the key to be set after 128 bits will be set to bezero.
§Example 1 for normal case
use cryptocol::symmetric::AES_128;
let mut aes = AES_128::new_with_key_u128(0xEFCDAB9078563412EFCDAB9078563412);
let plaintext = 0x1234567890ABCDEF1234567890ABCDEF_u128;
let ciphertext = aes.encrypt_u128(plaintext);
println!("Plaintext:\t\t{:#034X}", plaintext);
println!("Ciphertext:\t\t{:#034X}", ciphertext);
assert_eq!(ciphertext, 0x01CCF8264AECB5D644E2BAE927584D87_u128);
let recovered_cipher_text = aes.decrypt_u128(ciphertext);
println!("Recovered-ciphertext:\t{:#034X}\n", recovered_cipher_text);
assert_eq!(recovered_cipher_text, 0x1234567890ABCDEF1234567890ABCDEF_u128);
assert_eq!(recovered_cipher_text, plaintext);§For more examples,
click here
Sourcepub fn encryptor_with_key<const K: usize>(key: &[u8; K]) -> Self
pub fn encryptor_with_key<const K: usize>(key: &[u8; K]) -> Self
Constructs a new object Rijndael_Generic as a positive encryptor (or an encryptor) for the component of BigCryptor128 and NAES.
§Arguments
- The argument
keyis the array of u8 that hasKelements.
§Features
- You won’t use this method unless you use BigCryptor128 and NAES for such as Triple AES.
- This method constructs the encryptor component of BigCryptor128 and NAES.
- This method sets the key to be the given argument
key. - If
Kis less than4 * NK, the rest bits of the key to be set afterKbits will be set to bezero. - If
Kis greater than4 * NK, the rest bits after4 * NBbits of the key given as the argument will be ignored.
§Example 1
use cryptocol::symmetric::{ AES_128, BigCryptor128, SmallCryptor };
let keys: [Box<dyn SmallCryptor<u128, 16>>; 3]
= [ Box::new(AES_128::encryptor_with_key(&[0xEF_u8, 0xCD, 0xAB, 0x90, 0x78, 0x56, 0x34, 0x12, 0x21, 0x43, 0x65, 0x87, 0x09, 0xBA, 0xDC, 0xFE])),
Box::new(AES_128::decryptor_with_key(&[0x21_u8, 0x43, 0x65, 0x87, 0x09, 0xBA, 0xDC, 0xFE, 0xEF, 0xCD, 0xAB, 0x90, 0x78, 0x56, 0x34, 0x12])),
Box::new(AES_128::encryptor_with_key(&[0xEF_u8, 0xCD, 0xAB, 0x90, 0x78, 0x56, 0x34, 0x12, 0x21, 0x43, 0x65, 0x87, 0x09, 0xBA, 0xDC, 0xFE])) ];
let mut taes = BigCryptor128::new_with_small_cryptor_array(keys);
let plaintext = 0x_1234567890ABCDEFFEDCA0987654321_u128;
let ciphertext = taes.encrypt_u128(plaintext);
println!("Plaintext:\t\t{:#034X}", plaintext);
println!("Ciphertext:\t\t{:#034X}", ciphertext);
assert_eq!(ciphertext, 0x_E301940B5A5DE1600D78C375BF58F232_u128);
let recovered_text = taes.decrypt_u128(ciphertext);
println!("Recovered text:\t{:#034X}", recovered_text);
assert_eq!(recovered_text, 0x_1234567890ABCDEFFEDCA0987654321_u128);
assert_eq!(recovered_text, plaintext);§For more examples,
click here
Sourcepub fn encryptor_with_key_u128(key: u128) -> Self
pub fn encryptor_with_key_u128(key: u128) -> Self
Constructs a new object Rijndael_Generic as a positive encryptor (or an encryptor) for the component of BigCryptor128 and NAES.
§Arguments
- The argument
keyis ofu128. - It should be in the same endianness of machine. For example,
if the intended key is [0x12, 0x34, 0x56, 0x78, 0x90, 0xAB, 0xCD,
0xEF, 0x12, 0x34, 0x56, 0x78, 0x90, 0xAB, 0xCD, 0xEF], the key in
u128for this argument is 0x_1234567890ABCDEF1234567890ABCDEF_u128 for big-endian machine, and the key inu128for this argument is 0x_EFCDAB9078563412EFCDAB9078563412_u128 for little-endian machine.
§Features
- You won’t use this method unless you use BigCryptor128 and NAES for such as Triple AES.
- This method constructs the encryptor component of BigCryptor128 and NAES.
- This method sets the key to be the given argument
key. - If
NKis less than4, the rest bits at the address higher than4 * NK * 8bits of the key given as the argument will be ignored. - If
NKis greater than4, the rest bits of the key to be set after 128 bits will be set to bezero.
§Example 1
use cryptocol::symmetric::{ AES_128, BigCryptor128, SmallCryptor };
let mut taes = BigCryptor128::new_with_small_cryptor_array(
[Box::new(AES_128::encryptor_with_key_u128(0x_1234567890ABCDEFFEDCA0987654321_u128)),
Box::new(AES_128::decryptor_with_key_u128(0x_FEDCBA09876543211234567890ABCDEF_u128)),
Box::new(AES_128::encryptor_with_key_u128(0x_1234567890ABCDEFFEDCA0987654321_u128))]
);
let plaintext = 0x_11223344556677889900AABBCCDDEEFF_u128;
let ciphertext = taes.encrypt_u128(plaintext);
println!("Plaintext:\t\t{:#034X}", plaintext);
println!("Ciphertext:\t\t{:#034X}", ciphertext);
assert_eq!(ciphertext, 0x_DB56B1B7D320D7481BF40A1964E9C7C4_u128);
let recovered_text = taes.decrypt_u128(ciphertext);
println!("Recovered text:\t{:#034X}", recovered_text);
assert_eq!(recovered_text, 0x_11223344556677889900AABBCCDDEEFF_u128);
assert_eq!(recovered_text, plaintext);§For more examples,
click here
Sourcepub fn decryptor_with_key<const K: usize>(key: &[u8; K]) -> Self
pub fn decryptor_with_key<const K: usize>(key: &[u8; K]) -> Self
Constructs a new object Rijndael_Generic as a negative encryptor (or a decryptor) for the component of BigCryptor128 and NAES.
§Arguments
- The argument
keyis the array of u8 that hasKelements.
§Features
- You won’t use this method unless you use BigCryptor128 and NAES for such as Triple AES.
- This method constructs the encryptor component of BigCryptor128 and NAES.
- This method sets the key to be the given argument
key. - If
Kis less than4 * NK, the rest bits of the key to be set afterK * 8bits will be set to bezero. - If
Kis greater than4 * NK, the rest bits after4 * NB * 8bits of the key given as the argument will be ignored.
§Example 1
use cryptocol::symmetric::{ AES_128, BigCryptor128, SmallCryptor };
let keys: [Box<dyn SmallCryptor<u128, 16>>; 3]
= [ Box::new(AES_128::encryptor_with_key(&[0xEF_u8, 0xCD, 0xAB, 0x90, 0x78, 0x56, 0x34, 0x12, 0x21, 0x43, 0x65, 0x87, 0x09, 0xBA, 0xDC, 0xFE])),
Box::new(AES_128::decryptor_with_key(&[0x21_u8, 0x43, 0x65, 0x87, 0x09, 0xBA, 0xDC, 0xFE, 0xEF, 0xCD, 0xAB, 0x90, 0x78, 0x56, 0x34, 0x12])),
Box::new(AES_128::encryptor_with_key(&[0xEF_u8, 0xCD, 0xAB, 0x90, 0x78, 0x56, 0x34, 0x12, 0x21, 0x43, 0x65, 0x87, 0x09, 0xBA, 0xDC, 0xFE])) ];
let mut taes = BigCryptor128::new_with_small_cryptor_array(keys);
let plaintext = 0x_1234567890ABCDEFFEDCA0987654321_u128;
let ciphertext = taes.encrypt_u128(plaintext);
println!("Plaintext:\t\t{:#034X}", plaintext);
println!("Ciphertext:\t\t{:#034X}", ciphertext);
assert_eq!(ciphertext, 0x_E301940B5A5DE1600D78C375BF58F232_u128);
let recovered_text = taes.decrypt_u128(ciphertext);
println!("Recovered text:\t{:#034X}", recovered_text);
assert_eq!(recovered_text, 0x_1234567890ABCDEFFEDCA0987654321_u128);
assert_eq!(recovered_text, plaintext);§For more examples,
click here
Sourcepub fn decryptor_with_key_u128(key: u128) -> Self
pub fn decryptor_with_key_u128(key: u128) -> Self
Constructs a new object Rijndael_Generic as a negative encryptor (or a decryptor) for the component of BigCryptor128 and NAES.
§Arguments
- The argument
keyis ofu128. - It should be in the same endianness of machine. For example,
if the intended key is [0x12, 0x34, 0x56, 0x78, 0x90, 0xAB, 0xCD,
0xEF, 0x12, 0x34, 0x56, 0x78, 0x90, 0xAB, 0xCD, 0xEF], the key in
u128for this argument is 0x_1234567890ABCDEF1234567890ABCDEF_u128 for big-endian machine, and the key inu128for this argument is 0x_EFCDAB9078563412EFCDAB9078563412_u128 for little-endian machine.
§Features
- You won’t use this method unless you use BigCryptor128 and NAES for such as Triple AES.
- This method constructs the encryptor component of BigCryptor128 and NAES.
- This method sets the key to be the given argument
key. - If
NKis less than4, the rest bits at the address higher than4 * NK * 8bits of the key given as the argument will be ignored. - If
NKis greater than4, the rest bits of the key to be set after 128 bits will be set to bezero.
§Example 1
use cryptocol::symmetric::{ AES_128, BigCryptor128, SmallCryptor };
let mut taes = BigCryptor128::new_with_small_cryptor_array(
[Box::new(AES_128::encryptor_with_key_u128(0x_1234567890ABCDEFFEDCA0987654321_u128)),
Box::new(AES_128::decryptor_with_key_u128(0x_FEDCBA09876543211234567890ABCDEF_u128)),
Box::new(AES_128::encryptor_with_key_u128(0x_1234567890ABCDEFFEDCA0987654321_u128))]
);
let plaintext = 0x_11223344556677889900AABBCCDDEEFF_u128;
let ciphertext = taes.encrypt_u128(plaintext);
println!("Plaintext:\t\t{:#034X}", plaintext);
println!("Ciphertext:\t\t{:#034X}", ciphertext);
assert_eq!(ciphertext, 0x_DB56B1B7D320D7481BF40A1964E9C7C4_u128);
let recovered_text = taes.decrypt_u128(ciphertext);
println!("Recovered text:\t{:#034X}", recovered_text);
assert_eq!(recovered_text, 0x_11223344556677889900AABBCCDDEEFF_u128);
assert_eq!(recovered_text, plaintext);§For more examples,
click here
Sourcepub fn get_key(&mut self) -> [u32; NK]
pub fn get_key(&mut self) -> [u32; NK]
Gets the key.
§Output
This method returns the key in the form of array of u32.
§Example 1 for AES_128
use cryptocol::symmetric::AES_128;
let mut _aes = AES_128::new_with_key(&[0x12, 0x34, 0x56, 0x78, 0x90, 0xAB, 0xCD, 0xEF, 0x12, 0x34, 0x56, 0x78, 0x90, 0xAB, 0xCD, 0xEF]);
let key = _aes.get_key();
print!("K = ");
for k in key
{ print!("{:#010X} ", k); }
println!();
assert_eq!(key, [0x78563412, 0xEFCDAB90, 0x78563412, 0xEFCDAB90]);§For more examples,
click here
Sourcepub fn get_key_u128(&self) -> u128
pub fn get_key_u128(&self) -> u128
Gets the key.
§Output
This method returns the key in the form of u128.
§Features
- If
NKis less than4, the rest bits at the address higher than4 * NK * 8bits of the returned key will be set to bezero. - If
NKis greater than4, the rest bits of the key to be returned after 128 bits will be ignored.
§Example 1 for 128-bit key
use cryptocol::symmetric::AES_128;
let mut _aes = AES_128::new_with_key(&[0x12, 0x34, 0x56, 0x78, 0x90, 0xAB, 0xCD, 0xEF, 0x12, 0x34, 0x56, 0x78, 0x90, 0xAB, 0xCD, 0xEF]);
let key = _aes.get_key_u128();
println!("Key = {:#034X}", key);
assert_eq!(key, 0xEFCDAB9078563412EFCDAB9078563412_u128);§For more examples,
click here
Sourcepub fn set_key<const K: usize>(&mut self, key: &[u8; K])
pub fn set_key<const K: usize>(&mut self, key: &[u8; K])
Sets the key.
§Arguments
- The argument
keyis the array ofu8that hasKelements.
§Features
- This method sets the key to be the given argument
key. - If
Kis less than4 * NK, the rest bits of the key to be set afterK * 8bits will be set to bezero. - If
Kis greater than4 * NK, the rest bits after4 * NK * 8bits of the key given as the argument will be ignored.
§Example 1 for normal case
use cryptocol::symmetric::AES_128;
let mut aes = AES_128::new();
aes.set_key(&[0x12, 0x34, 0x56, 0x78, 0x90, 0xAB, 0xCD, 0xEF, 0x12, 0x34, 0x56, 0x78, 0x90, 0xAB, 0xCD, 0xEF]);
let key = aes.get_key();
print!("K = ");
for k in key
{ print!("{:#010X} ", k); }
println!();
assert_eq!(key, [0x78563412, 0xEFCDAB90, 0x78563412, 0xEFCDAB90]);§For more examples,
click here
Sourcepub fn set_key_u128(&mut self, key: u128)
pub fn set_key_u128(&mut self, key: u128)
Constructs a new object Rijndael_Generic.
§Arguments
- The argument
keyis ofu128. - It should be in the same endianness of machine. For example,
if the intended key is [0x12, 0x34, 0x56, 0x78, 0x90, 0xAB, 0xCD,
0xEF, 0x12, 0x34, 0x56, 0x78, 0x90, 0xAB, 0xCD, 0xEF], the key in
u128for this argument is 0x_1234567890ABCDEF1234567890ABCDEF_u128 for big-endian machine, and the key inu128for this argument is 0x_EFCDAB9078563412EFCDAB9078563412_u128 for little-endian machine.
§Features
- This method sets the key to be the given argument
key. - If
NKis less than4, the rest bits at the address higher than4 * NK * 8bits of the key given as the argument will be ignored. - If
NKis greater than4, the rest bits of the key to be set after 128 bits will be set to bezero.
§Example 1 for normal case
use cryptocol::symmetric::AES_128;
let mut aes = AES_128::new();
aes.set_key_u128(0xEFCDAB9078563412EFCDAB9078563412);
let key = aes.get_key();
print!("K = ");
for k in key
{ print!("{:#010X} ", k); }
println!();
assert_eq!(key, [0x78563412, 0xEFCDAB90, 0x78563412, 0xEFCDAB90]);§For more examples,
click here
Sourcepub fn turn_inverse(&mut self)
pub fn turn_inverse(&mut self)
Flips its role in BigCryptor128 or NAES.
§Features
- You won’t use this method unless you use BigCryptor128 or NAES for such as Triple DES.
- Even if you are writing codes in the context of using BigCryptor128 or NAES, you will hardly use this method because it is high chance that you will have constructed components with the methods, encryptor_with_key(struct@Rijndael_Generic#method.encryptor_with_key), encryptor_with_key_u64(struct@Rijndael_Generic#method.encryptor_with_key_u128), decryptor_with_key(struct@Rijndael_Generic#method.decryptor_with_key), and decryptor_with_key_u64(struct@Rijndael_Generic#method.decryptor_with_key_u128).
- If it is constructed as encryptor for BigCryptor128 or NAES, it will be changed into decryptor.
- If it is constructed as decryptor for BigCryptor128 or NAES, it will be changed into encryptor.
§Example 1
use cryptocol::symmetric::{ AES_128, BigCryptor128, SmallCryptor };
let mut keys: [Box<dyn SmallCryptor<u128, 16>>; 3]
= [ Box::new(AES_128::new_with_key_u128(0x_1234567890ABCDEFFEDCA0987654321_u128)),
Box::new(AES_128::new_with_key_u128(0x_FEDCBA09876543211234567890ABCDEF_u128)),
Box::new(AES_128::new_with_key_u128(0x_1234567890ABCDEFFEDCA0987654321_u128)) ];
keys[1].turn_inverse();
let mut taes = BigCryptor128::new_with_small_cryptor_array(keys);
let plaintext = 0x_11223344556677889900AABBCCDDEEFF_u128;
let ciphertext = taes.encrypt_u128(plaintext);
println!("Plaintext:\t\t{:#034X}", plaintext);
println!("Ciphertext:\t\t{:#034X}", ciphertext);
assert_eq!(ciphertext, 0x_DB56B1B7D320D7481BF40A1964E9C7C4_u128);
let recovered_text = taes.decrypt_u128(ciphertext);
println!("Recovered text:\t{:#034X}", recovered_text);
assert_eq!(recovered_text, 0x_11223344556677889900AABBCCDDEEFF_u128);
assert_eq!(recovered_text, plaintext);§For more examples,
click here
Sourcepub fn turn_encryptor(&mut self)
pub fn turn_encryptor(&mut self)
Changes its role in BigCryptor128 or NAES to encryptor.
§Features
- You won’t use this method unless you use BigCryptor128 or NAES for such as Triple AES.
- Even if you are writing codes in the context of using BigCryptor128 or NAES, you will hardly use this method because it is high chance that you will have constructed components with the methods, encryptor_with_key, encryptor_with_key_u128, decryptor_with_key, and decryptor_with_key_u128.
- If it is constructed as encryptor for BigCryptor128 or NAES, it will not be changed at all.
- If it is constructed as decryptor for BigCryptor128 or NAES, it will be changed into encryptor.
§Example 1
use cryptocol::symmetric::{ AES_128, BigCryptor128, SmallCryptor };
let mut keys: [Box<dyn SmallCryptor<u128, 16>>; 3]
= [ Box::new(AES_128::new_with_key_u128(0x_1234567890ABCDEFFEDCA0987654321_u128)),
Box::new(AES_128::new_with_key_u128(0x_FEDCBA09876543211234567890ABCDEF_u128)),
Box::new(AES_128::new_with_key_u128(0x_1234567890ABCDEFFEDCA0987654321_u128)) ];
keys[0].turn_encryptor();
let mut taes = BigCryptor128::new_with_small_cryptor_array(keys);
let plaintext = 0x_11223344556677889900AABBCCDDEEFF_u128;
let ciphertext = taes.encrypt_u128(plaintext);
println!("Plaintext:\t\t{:#034X}", plaintext);
println!("Ciphertext:\t\t{:#034X}", ciphertext);
assert_eq!(ciphertext, 0x_5C842CA9ECB742B2F3164BC33E0BDCB6_u128);
let recovered_text = taes.decrypt_u128(ciphertext);
println!("Recovered text:\t{:#034X}", recovered_text);
assert_eq!(recovered_text, 0x_11223344556677889900AABBCCDDEEFF_u128);
assert_eq!(recovered_text, plaintext);§For more examples,
click here
Sourcepub fn turn_decryptor(&mut self)
pub fn turn_decryptor(&mut self)
Changes its role in BigCryptor128 or NAES to decryptor.
§Features
- You won’t use this method unless you use BBigCryptor128 or NAES for such as Triple DES.
- Even if you are writing codes in the context of using BigCryptor128 or NAES, you will hardly use this method because it is high chance that you will have constructed components with the methods, encryptor_with_key, encryptor_with_key_u128, decryptor_with_key, and decryptor_with_key_u128.
- If it is constructed as encryptor for BigCryptor128 or NAES, it will be changed into decryptor.
- If it is constructed as decryptor for BigCryptor128 or NAES, it will not be changed at all.
§Example 1
use cryptocol::symmetric::{ AES_128, BigCryptor128, SmallCryptor };
let mut keys: [Box<dyn SmallCryptor<u128, 16>>; 3]
= [ Box::new(AES_128::new_with_key_u128(0x_1234567890ABCDEFFEDCA0987654321_u128)),
Box::new(AES_128::new_with_key_u128(0x_FEDCBA09876543211234567890ABCDEF_u128)),
Box::new(AES_128::new_with_key_u128(0x_1234567890ABCDEFFEDCA0987654321_u128)) ];
keys[1].turn_decryptor();
let mut taes = BigCryptor128::new_with_small_cryptor_array(keys);
let plaintext = 0x_11223344556677889900AABBCCDDEEFF_u128;
let ciphertext = taes.encrypt_u128(plaintext);
println!("Plaintext:\t\t{:#034X}", plaintext);
println!("Ciphertext:\t\t{:#034X}", ciphertext);
assert_eq!(ciphertext, 0x_DB56B1B7D320D7481BF40A1964E9C7C4_u128);
let recovered_text = taes.decrypt_u128(ciphertext);
println!("Recovered text:\t{:#034X}", recovered_text);
assert_eq!(recovered_text, 0x_11223344556677889900AABBCCDDEEFF_u128);
assert_eq!(recovered_text, plaintext);§For more examples,
click here
Sourcepub fn encrypt_unit(&mut self, message: &[IntUnion; NB]) -> [IntUnion; NB]
pub fn encrypt_unit(&mut self, message: &[IntUnion; NB]) -> [IntUnion; NB]
Encrypts data in the form of an array of IntUnion with NB elements.
§Arguments
message is of the type &[IntUnion; NB]
and the plaintext to be encrypted.
§Output
This method returns the encrypted data in the array of IntUnion
with NB elements.
§Counterpart methods
For each trait
ECB_PKCS7,
ECB_ISO,
CBC_PKCS7,
CBC_ISO,
PCBC_PKCS7,
PCBC_ISO.
CFB,
OFB, and
CTR,
there are provided useful counterpart methods:
encrypt(), encrypt_into_vec(), encrypt_into_array(),
encrypt_str(), encrypt_str_into_vec(), encrypt_str_into_array(),
encrypt_string(), encrypt_string_into_vec(), encrypt_string_into_array(),
encrypt_vec(), encrypt_vec_into_vec(), encrypt_vec_into_array(),
encrypt_array(), encrypt_array_into_vec(), and encrypt_array_into_array().
§Example 1 for AES_128
use cryptocol::number::IntUnion;
use cryptocol::symmetric::AES_128;
let mut aes = AES_128::new_with_key(&[0x12, 0x34, 0x56, 0x78, 0x90, 0xAB, 0xCD, 0xEF, 0x12, 0x34, 0x56, 0x78, 0x90, 0xAB, 0xCD, 0xEF]);
let plaintext = [IntUnion::new_with(0x90ABCDEF), IntUnion::new_with(0x12345678), IntUnion::new_with(0x90ABCDEF), IntUnion::new_with(0x12345678)];
let ciphertext = aes.encrypt_unit(&plaintext);
println!("Plaintext:\t{:08X}{:08X}{:08X}{:08X}", plaintext[0].get(), plaintext[1].get(), plaintext[2].get(), plaintext[3].get());
println!("Ciphertext:\t{:08X}{:08X}{:08X}{:08X}", ciphertext[0].get(), ciphertext[1].get(), ciphertext[2].get(), ciphertext[3].get());
assert_eq!(ciphertext[0].get(), 0x27584D87);
assert_eq!(ciphertext[1].get(), 0x44E2BAE9);
assert_eq!(ciphertext[2].get(), 0x4AECB5D6);
assert_eq!(ciphertext[3].get(), 0x01CCF826);§For more examples,
click here
Sourcepub fn encrypt_u128(&mut self, message: u128) -> u128
pub fn encrypt_u128(&mut self, message: u128) -> u128
Encrypts a 128-bit data.
§Arguments
message is of u128-type and the plaintext to be encrypted.
§Output
This method returns the encrypted data of u128-type from message.
§Caution
- This method is meaningful only when
NBis4. - If
NBis other than4, this method may panic. - Even if this method does not panic, its behaviour is not defined.
§Counterpart Methods
For each trait
ECB_PKCS7,
ECB_ISO,
CBC_PKCS7,
CBC_ISO,
PCBC_PKCS7,
PCBC_ISO.
CFB,
OFB, and
CTR,
there are provided useful counterpart methods:
encrypt(), encrypt_into_vec(), encrypt_into_array(),
encrypt_str(), encrypt_str_into_vec(), encrypt_str_into_array(),
encrypt_string(), encrypt_string_into_vec(), encrypt_string_into_array(),
encrypt_vec(), encrypt_vec_into_vec(), encrypt_vec_into_array(),
encrypt_array(), encrypt_array_into_vec(), and encrypt_array_into_array().
§Example 1 for AES_128
use cryptocol::symmetric::AES_128;
let mut aes = AES_128::new_with_key(&[0x12, 0x34, 0x56, 0x78, 0x90, 0xAB, 0xCD, 0xEF, 0x12, 0x34, 0x56, 0x78, 0x90, 0xAB, 0xCD, 0xEF]);
let plaintext = 0x1234567890ABCDEF1234567890ABCDEF;
let ciphertext = aes.encrypt_u128(plaintext);
println!("Plaintext:\t{:#034X}", plaintext);
println!("Ciphertext:\t{:#034X}", ciphertext);
assert_eq!(ciphertext, 0x01CCF8264AECB5D644E2BAE927584D87_u128);§For more examples,
click here
Sourcepub fn encrypt_u64(&mut self, message: u64) -> u64
pub fn encrypt_u64(&mut self, message: u64) -> u64
Encrypts a 64-bit data.
§Arguments
message is of u64-type and the plaintext to be encrypted.
§Output
This method returns the encrypted data of u64-type from message.
§Caution
- This method is meaningful only when
NBis2. - If
NBis other than2, this method may panic. - Even if this method does not panic, its behaviour is not defined.
§Counterpart Methods
For each trait
ECB_PKCS7,
ECB_ISO,
CBC_PKCS7,
CBC_ISO,
PCBC_PKCS7,
PCBC_ISO.
CFB,
OFB, and
CTR,
there are provided useful counterpart methods:
encrypt(), encrypt_into_vec(), encrypt_into_array(),
encrypt_str(), encrypt_str_into_vec(), encrypt_str_into_array(),
encrypt_string(), encrypt_string_into_vec(), encrypt_string_into_array(),
encrypt_vec(), encrypt_vec_into_vec(), encrypt_vec_into_array(),
encrypt_array(), encrypt_array_into_vec(), and encrypt_array_into_array().
§Example 1 for Rijndael_64_64
use cryptocol::symmetric::Rijndael_64_64;
let mut rijndael = Rijndael_64_64::new_with_key(&[0x12, 0x34, 0x56, 0x78, 0x90, 0xAB, 0xCD, 0xEF]);
let plaintext = 0x1234567890ABCDEF;
println!("Plaintext:\t{:#018X}", plaintext);
let ciphertext = rijndael.encrypt_u64(plaintext);
println!("Ciphertext:\t{:#018X}", ciphertext);
assert_eq!(ciphertext, 0x4FAA3F0E49CC4DCF_u64);§For more examples,
click here
Sourcepub fn encrypt_u32(&mut self, message: u32) -> u32
pub fn encrypt_u32(&mut self, message: u32) -> u32
Encrypts a 32-bit data.
§Arguments
message is of u32-type and the plaintext to be encrypted.
§Output
This method returns the encrypted data of u32-type from message.
§Caution
- This method is meaningful only when
NBis1. - If
NBis other than1, this method may panic. - Even if this method does not panic, its behaviour is not defined.
§Counterpart Methods
For each trait
ECB_PKCS7,
ECB_ISO,
CBC_PKCS7,
CBC_ISO,
PCBC_PKCS7,
PCBC_ISO.
CFB,
OFB, and
CTR,
there are provided useful counterpart methods:
encrypt(), encrypt_into_vec(), encrypt_into_array(),
encrypt_str(), encrypt_str_into_vec(), encrypt_str_into_array(),
encrypt_string(), encrypt_string_into_vec(), encrypt_string_into_array(),
encrypt_vec(), encrypt_vec_into_vec(), encrypt_vec_into_array(),
encrypt_array(), encrypt_array_into_vec(), and encrypt_array_into_array().
§Example 1 for Rijndael_32_32
use cryptocol::symmetric::Rijndael_32_32;
let mut rijndael = Rijndael_32_32::new_with_key(&[0x12, 0x34, 0x56, 0x78]);
let plaintext = 0x1234567;
println!("Plaintext:\t{:#010X}", plaintext);
let ciphertext = rijndael.encrypt_u32(plaintext);
println!("Ciphertext:\t{:#010X}", ciphertext);
assert_eq!(ciphertext, 0xB25E4E09_u32);§For more examples,
click here
Sourcepub fn decrypt_unit(&mut self, cipher: &[IntUnion; NB]) -> [IntUnion; NB]
pub fn decrypt_unit(&mut self, cipher: &[IntUnion; NB]) -> [IntUnion; NB]
Decrypts data in the form of an array of IntUnion with NB elements.
§Arguments
cipher is of the type &[IntUnion; NB]
and the ciphertext to be decrypted.
§Output
This method returns the decrypted data in the array of IntUnion
with NB elements.
§Counterpart Methods
For each trait
ECB_PKCS7,
ECB_ISO,
CBC_PKCS7,
CBC_ISO,
PCBC_PKCS7,
PCBC_ISO.
CFB,
OFB, and
CTR,
there are provided useful counterpart methods:
decrypt(), decrypt_into_vec(), decrypt_into_array(),
decrypt_into_string(),
decrypt_vec(), decrypt_vec_into_vec(), decrypt_vec_into_array(),
decrypt_vec_into_string(),
decrypt_array(), decrypt_array_into_vec(), decrypt_array_into_array(),
and decrypt_array_into_string().
§Example 1 for AES_128
use cryptocol::number::IntUnion;
use cryptocol::symmetric::AES_128;
let mut aes = AES_128::new_with_key(&[0x12, 0x34, 0x56, 0x78, 0x90, 0xAB, 0xCD, 0xEF, 0x12, 0x34, 0x56, 0x78, 0x90, 0xAB, 0xCD, 0xEF]);
let ciphertext = [IntUnion::new_with(0x27584D87), IntUnion::new_with(0x44E2BAE9), IntUnion::new_with(0x4AECB5D6), IntUnion::new_with(0x01CCF826)];
let plaintext = aes.decrypt_unit(&ciphertext);
println!("Ciphertext:\t{:08X}{:08X}{:08X}{:08X}", ciphertext[0].get(), ciphertext[1].get(), ciphertext[2].get(), ciphertext[3].get());
println!("Plaintext:\t{:08X}{:08X}{:08X}{:08X}", plaintext[0].get(), plaintext[1].get(), plaintext[2].get(), plaintext[3].get());
assert_eq!(plaintext[0].get(), 0x90ABCDEF);
assert_eq!(plaintext[1].get(), 0x12345678);
assert_eq!(plaintext[2].get(), 0x90ABCDEF);
assert_eq!(plaintext[3].get(), 0x12345678);§For more examples,
click here
Sourcepub fn decrypt_u128(&mut self, cipher: u128) -> u128
pub fn decrypt_u128(&mut self, cipher: u128) -> u128
Decrypts a 128-bit data.
§Arguments
cioher is of u128-type and the ciphertext to be decrypted.
§Output
This method returns the decrypted data of u128-type from cipher.
§Caution
- This method is meaningful only when
NBis4. - If
NBis other than4, this method may panic. - Even if this method does not panic, its behaviour is not defined.
§Counterpart Methods
For each trait
ECB_PKCS7,
ECB_ISO,
CBC_PKCS7,
CBC_ISO,
PCBC_PKCS7,
PCBC_ISO.
CFB,
OFB, and
CTR,
there are provided useful counterpart methods:
decrypt(), decrypt_into_vec(), decrypt_into_array(),
decrypt_into_string(),
decrypt_vec(), decrypt_vec_into_vec(), decrypt_vec_into_array(),
decrypt_vec_into_string(),
decrypt_array(), decrypt_array_into_vec(), decrypt_array_into_array(),
and decrypt_array_into_string().
§Example 1 for AES_128
use cryptocol::number::IntUnion;
use cryptocol::symmetric::AES_128;
let mut aes = AES_128::new_with_key(&[0x12, 0x34, 0x56, 0x78, 0x90, 0xAB, 0xCD, 0xEF, 0x12, 0x34, 0x56, 0x78, 0x90, 0xAB, 0xCD, 0xEF]);
let ciphertext = 0x01CCF8264AECB5D644E2BAE927584D87_u128;
let plaintext = aes.decrypt_u128(ciphertext);
println!("Ciphertext:\t{:#034X}", ciphertext);
println!("Plaintext:\t{:#034X}", plaintext);
assert_eq!(plaintext, 0x1234567890ABCDEF1234567890ABCDEF);§For more examples,
click here
Sourcepub fn decrypt_u64(&mut self, cipher: u64) -> u64
pub fn decrypt_u64(&mut self, cipher: u64) -> u64
Decrypts a 64-bit data.
§Arguments
cioher is of u64-type and the ciphertext to be decrypted.
§Output
This method returns the decrypted data of u64-type from cipher.
§Caution
- This method is meaningful only when
NBis2. - If
NBis other than2, this method may panic. - Even if this method does not panic, its behaviour is not defined.
§Counterpart Methods
For each trait
ECB_PKCS7,
ECB_ISO,
CBC_PKCS7,
CBC_ISO,
PCBC_PKCS7,
PCBC_ISO.
CFB,
OFB, and
CTR,
there are provided useful counterpart methods:
decrypt(), decrypt_into_vec(), decrypt_into_array(),
decrypt_into_string(),
decrypt_vec(), decrypt_vec_into_vec(), decrypt_vec_into_array(),
decrypt_vec_into_string(),
decrypt_array(), decrypt_array_into_vec(), decrypt_array_into_array(),
and decrypt_array_into_string().
§Example 1 for Rijndael_64_64
use cryptocol::symmetric::Rijndael_64_64;
let mut rijndael = Rijndael_64_64::new_with_key(&[0x12, 0x34, 0x56, 0x78, 0x90, 0xAB, 0xCD, 0xEF]);
let ciphertext = 0x4FAA3F0E49CC4DCF_u64;
println!("Ciphertext:\t{:#018X}", ciphertext);
let plaintext = rijndael.decrypt_u64(ciphertext);
println!("Plaintext:\t{:#018X}", plaintext);
assert_eq!(plaintext, 0x1234567890ABCDEF_u64);§For more examples,
click here
Sourcepub fn decrypt_u32(&mut self, cipher: u32) -> u32
pub fn decrypt_u32(&mut self, cipher: u32) -> u32
Decrypts a 32-bit data.
§Arguments
cioher is of u32-type and the ciphertext to be decrypted.
§Output
This method returns the decrypted data of u32-type from cipher.
§Caution
- This method is meaningful only when
NBis1. - If
NBis other than1, this method may panic. - Even if this method does not panic, its behaviour is not defined.
§Counterpart Methods
For each trait
ECB_PKCS7,
ECB_ISO,
CBC_PKCS7,
CBC_ISO,
PCBC_PKCS7,
PCBC_ISO.
CFB,
OFB, and
CTR,
there are provided useful counterpart methods:
decrypt(), decrypt_into_vec(), decrypt_into_array(),
decrypt_into_string(),
decrypt_vec(), decrypt_vec_into_vec(), decrypt_vec_into_array(),
decrypt_vec_into_string(),
decrypt_array(), decrypt_array_into_vec(), decrypt_array_into_array(),
and decrypt_array_into_string().
§Example 1 for Rijndael_32_32
use cryptocol::symmetric::Rijndael_32_32;
let mut rijndael = Rijndael_32_32::new_with_key(&[0x12, 0x34, 0x56, 0x78]);
let ciphertext = 0xB25E4E09_u32;
println!("Ciphertext:\t{:#010X}", ciphertext);
let plaintext = rijndael.decrypt_u32(ciphertext);
println!("Plaintext:\t{:#010X}", plaintext);
assert_eq!(plaintext, 0x1234567_u32);§For more examples,
click here
Sourcepub fn encrypt_array_unit<const N: usize>(
&mut self,
message: &[[IntUnion; NB]; N],
cipher: &mut [[IntUnion; NB]; N],
)
pub fn encrypt_array_unit<const N: usize>( &mut self, message: &[[IntUnion; NB]; N], cipher: &mut [[IntUnion; NB]; N], )
Encrypts an array of unit data, [[IntUnion; NB]; N].
§Arguments
messageis of an array of[IntUnion; NB]-type and the plaintext to be encrypted.cipheris of an array of[IntUnion; NB]-type and the ciphertext to be stored.
§Features
This method encrypts multiple of 64-bit data without padding anything in ECB (Electronic CodeBook) mode.
§Counterpart Methods
For each trait
ECB_PKCS7,
ECB_ISO,
CBC_PKCS7,
CBC_ISO,
PCBC_PKCS7,
PCBC_ISO.
CFB,
OFB, and
CTR,
there are provided useful counterpart methods:
encrypt(), encrypt_into_vec(), encrypt_into_array(),
encrypt_str(), encrypt_str_into_vec(), encrypt_str_into_array(),
encrypt_string(), encrypt_string_into_vec(), encrypt_string_into_array(),
encrypt_vec(), encrypt_vec_into_vec(), encrypt_vec_into_array(),
encrypt_array(), encrypt_array_into_vec(), and encrypt_array_into_array().
§Example 1 for AES_128
use cryptocol::number::IntUnion;
use cryptocol::symmetric::AES_128;
let mut aes = AES_128::new_with_key(&[0x12, 0x34, 0x56, 0x78, 0x90, 0xAB, 0xCD, 0xEF, 0x12, 0x34, 0x56, 0x78, 0x90, 0xAB, 0xCD, 0xEF]);
let plaintext = [[IntUnion::new_with(0x90ABCDEF), IntUnion::new_with(0x12345678), IntUnion::new_with(0x90ABCDEF), IntUnion::new_with(0x12345678)]; 3];
let mut ciphertext = [[IntUnion::new(); 4]; 3];
aes.encrypt_array_unit(&plaintext, &mut ciphertext);
println!("Plaintext:\t{:08X}{:08X}{:08X}{:08X}{:08X}{:08X}{:08X}{:08X}{:08X}{:08X}{:08X}{:08X}",
plaintext[0][0].get(), plaintext[0][1].get(), plaintext[0][2].get(), plaintext[0][3].get(),
plaintext[1][0].get(), plaintext[1][1].get(), plaintext[1][2].get(), plaintext[1][3].get(),
plaintext[2][0].get(), plaintext[2][1].get(), plaintext[2][2].get(), plaintext[2][3].get());
println!("Ciphertext:\t{:08X}{:08X}{:08X}{:08X}{:08X}{:08X}{:08X}{:08X}{:08X}{:08X}{:08X}{:08X}",
ciphertext[0][0].get(), ciphertext[0][1].get(), ciphertext[0][2].get(), ciphertext[0][3].get(),
ciphertext[1][0].get(), ciphertext[1][1].get(), ciphertext[1][2].get(), ciphertext[1][3].get(),
ciphertext[2][0].get(), ciphertext[2][1].get(), ciphertext[2][2].get(), ciphertext[2][3].get());
assert_eq!(ciphertext[0][0].get(), 0x27584D87);
assert_eq!(ciphertext[0][1].get(), 0x44E2BAE9);
assert_eq!(ciphertext[0][2].get(), 0x4AECB5D6);
assert_eq!(ciphertext[0][3].get(), 0x01CCF826);
assert_eq!(ciphertext[1][0].get(), 0x27584D87);
assert_eq!(ciphertext[1][1].get(), 0x44E2BAE9);
assert_eq!(ciphertext[1][2].get(), 0x4AECB5D6);
assert_eq!(ciphertext[1][3].get(), 0x01CCF826);
assert_eq!(ciphertext[2][0].get(), 0x27584D87);
assert_eq!(ciphertext[2][1].get(), 0x44E2BAE9);
assert_eq!(ciphertext[2][2].get(), 0x4AECB5D6);
assert_eq!(ciphertext[2][3].get(), 0x01CCF826);§For more examples,
click here
Sourcepub fn encrypt_array_u128<const N: usize>(
&mut self,
message: &[u128; N],
cipher: &mut [u128; N],
)
pub fn encrypt_array_u128<const N: usize>( &mut self, message: &[u128; N], cipher: &mut [u128; N], )
Encrypts an array of 128-bit data.
§Arguments
messageis of an array ofu128-type and the plaintext to be encrypted.cipheris of an array ofu128-type and the ciphertext to be stored.
§Features
This method encrypts multiple of 128-bit data without padding anything in ECB (Electronic CodeBook) mode.
§Caution
- This method is meaningful only when
NBis4. - If
NBis other than4, this method may panic. - Even if this method does not panic, its behaviour is not defined.
§Counterpart Methods
For each trait
ECB_PKCS7,
ECB_ISO,
CBC_PKCS7,
CBC_ISO,
PCBC_PKCS7,
PCBC_ISO.
CFB,
OFB, and
CTR,
there are provided useful counterpart methods:
encrypt(), encrypt_into_vec(), encrypt_into_array(),
encrypt_str(), encrypt_str_into_vec(), encrypt_str_into_array(),
encrypt_string(), encrypt_string_into_vec(), encrypt_string_into_array(),
encrypt_vec(), encrypt_vec_into_vec(), encrypt_vec_into_array(),
encrypt_array(), encrypt_array_into_vec(), and encrypt_array_into_array().
§Example 1 for AES_128
use cryptocol::symmetric::AES_128;
let mut aes = AES_128::new_with_key(&[0x12, 0x34, 0x56, 0x78, 0x90, 0xAB, 0xCD, 0xEF, 0x12, 0x34, 0x56, 0x78, 0x90, 0xAB, 0xCD, 0xEF]);
let plaintext = [0x1234567890ABCDEF1234567890ABCDEF_u128, 0x11223344556677889900AABBCCDDEEFF, 0xFFEEDDCCBBAA00998877665544332211];
let mut ciphertext = [0_u128; 3];
aes.encrypt_array_u128(&plaintext, &mut ciphertext);
println!("Plaintext:\t{:#034X} {:#034X} {:#034X}", plaintext[0], plaintext[1], plaintext[2]);
println!("Ciphertext:\t{:#034X} {:#034X} {:#034X}", ciphertext[0], ciphertext[1], ciphertext[2]);
assert_eq!(ciphertext[0], 0x01CCF8264AECB5D644E2BAE927584D87_u128);
assert_eq!(ciphertext[1], 0x7601C1D6EA61791544C28D4004577BB9_u128);
assert_eq!(ciphertext[2], 0xB7225E77C077541D5055FE9C8D3894B9_u128);§For more examples,
click here
Sourcepub fn encrypt_array_u64<const N: usize>(
&mut self,
message: &[u64; N],
cipher: &mut [u64; N],
)
pub fn encrypt_array_u64<const N: usize>( &mut self, message: &[u64; N], cipher: &mut [u64; N], )
Encrypts an array of 64-bit data.
§Arguments
messageis of an array ofu64-type and the plaintext to be encrypted.cipheris of an array ofu64-type and the ciphertext to be stored.
§Features
This method encrypts multiple of 64-bit data without padding anything in ECB (Electronic CodeBook) mode.
§Caution
- This method is meaningful only when
NBis2. - If
NBis other than2, this method may panic. - Even if this method does not panic, its behaviour is not defined.
§Counterpart Methods
For each trait
ECB_PKCS7,
ECB_ISO,
CBC_PKCS7,
CBC_ISO,
PCBC_PKCS7,
PCBC_ISO.
CFB,
OFB, and
CTR,
there are provided useful counterpart methods:
encrypt(), encrypt_into_vec(), encrypt_into_array(),
encrypt_str(), encrypt_str_into_vec(), encrypt_str_into_array(),
encrypt_string(), encrypt_string_into_vec(), encrypt_string_into_array(),
encrypt_vec(), encrypt_vec_into_vec(), encrypt_vec_into_array(),
encrypt_array(), encrypt_array_into_vec(), and encrypt_array_into_array().
§Example 1 for Rijndael_64_64
use cryptocol::symmetric::Rijndael_64_64;
let mut rijndael = Rijndael_64_64::new_with_key(&[0x12, 0x34, 0x56, 0x78, 0x90, 0xAB, 0xCD, 0xEF]);
let plaintext = [0x1234567890ABCDEF_u64, 0x1122334455667788, 0xFFEEDDCCBBAA0099];
let mut ciphertext = [0_u64; 3];
rijndael.encrypt_array_u64(&plaintext, &mut ciphertext);
println!("Plaintext:\t{:#018X} {:#018X} {:#018X}", plaintext[0], plaintext[1], plaintext[2]);
println!("Ciphertext:\t{:#018X} {:#018X} {:#018X}", ciphertext[0], ciphertext[1], ciphertext[2]);
assert_eq!(ciphertext[0], 0x4FAA3F0E49CC4DCF_u64);
assert_eq!(ciphertext[1], 0x036AAEDC0F1A5BEC_u64);
assert_eq!(ciphertext[2], 0x99B8209339BCC1EB_u64);§For more examples,
click here
Sourcepub fn encrypt_array_u32<const N: usize>(
&mut self,
message: &[u32; N],
cipher: &mut [u32; N],
)
pub fn encrypt_array_u32<const N: usize>( &mut self, message: &[u32; N], cipher: &mut [u32; N], )
Encrypts an array of 32-bit data.
§Arguments
messageis of an array ofu32-type and the plaintext to be encrypted.cipheris of an array ofu32-type and the ciphertext to be stored.
§Features
This method encrypts multiple of 32-bit data without padding anything in ECB (Electronic CodeBook) mode.
§Caution
- This method is meaningful only when
NBis1. - If
NBis other than1, this method may panic. - Even if this method does not panic, its behaviour is not defined.
§Counterpart Methods
For each trait
ECB_PKCS7,
ECB_ISO,
CBC_PKCS7,
CBC_ISO,
PCBC_PKCS7,
PCBC_ISO.
CFB,
OFB, and
CTR,
there are provided useful counterpart methods:
encrypt(), encrypt_into_vec(), encrypt_into_array(),
encrypt_str(), encrypt_str_into_vec(), encrypt_str_into_array(),
encrypt_string(), encrypt_string_into_vec(), encrypt_string_into_array(),
encrypt_vec(), encrypt_vec_into_vec(), encrypt_vec_into_array(),
encrypt_array(), encrypt_array_into_vec(), and encrypt_array_into_array().
§Example 1 for Rijndael_32_32
use cryptocol::symmetric::Rijndael_32_32;
let mut rijndael = Rijndael_32_32::new_with_key(&[0x12, 0x34, 0x56, 0x78, 0x90, 0xAB, 0xCD, 0xEF]);
let plaintext = [0x12345678_u32, 0x90ABCDEF, 0xFFEEDDCC];
let mut ciphertext = [0_u32; 3];
rijndael.encrypt_array_u32(&plaintext, &mut ciphertext);
println!("Plaintext:\t{:#010X} {:#010X} {:#010X}", plaintext[0], plaintext[1], plaintext[2]);
println!("Ciphertext:\t{:#010X} {:#010X} {:#010X}", ciphertext[0], ciphertext[1], ciphertext[2]);
assert_eq!(ciphertext[0], 0x335228F6_u32);
assert_eq!(ciphertext[1], 0xBFB99AFB_u32);
assert_eq!(ciphertext[2], 0x2D114838_u32);§For more examples,
click here
Sourcepub fn decrypt_array_unit<const N: usize>(
&mut self,
cipher: &[[IntUnion; NB]; N],
message: &mut [[IntUnion; NB]; N],
)
pub fn decrypt_array_unit<const N: usize>( &mut self, cipher: &[[IntUnion; NB]; N], message: &mut [[IntUnion; NB]; N], )
Decrypts an array of unit data, [[IntUnion; NB]; N].
§Arguments
cipheris of an array of[IntUnion; NB]-type and the ciphertext to be encrypted.messageis of an array of[IntUnion; NB]-type and the plaintext to be stored.
§Features
This method decrypts multiple of 64-bit data without padding anything in ECB (Electronic CodeBook) mode.
§Counterpart Methods
For each trait
ECB_PKCS7,
ECB_ISO,
CBC_PKCS7,
CBC_ISO,
PCBC_PKCS7,
PCBC_ISO.
CFB,
OFB, and
CTR,
there are provided useful counterpart methods:
decrypt(), decrypt_into_vec(), decrypt_into_array(),
decrypt_into_string(),
decrypt_vec(), decrypt_vec_into_vec(), decrypt_vec_into_array(),
decrypt_vec_into_string(),
decrypt_array(), decrypt_array_into_vec(), decrypt_array_into_array(),
and decrypt_array_into_string().
§Example 1 for AES_128
use cryptocol::number::IntUnion;
use cryptocol::symmetric::AES_128;
let mut aes = AES_128::new_with_key(&[0x12, 0x34, 0x56, 0x78, 0x90, 0xAB, 0xCD, 0xEF, 0x12, 0x34, 0x56, 0x78, 0x90, 0xAB, 0xCD, 0xEF]);
let ciphertext = [[IntUnion::new_with(0x27584D87), IntUnion::new_with(0x44E2BAE9), IntUnion::new_with(0x4AECB5D6), IntUnion::new_with(0x01CCF826)]; 3];
let mut plaintext = [[IntUnion::new(); 4]; 3];
aes.decrypt_array_unit(&ciphertext, &mut plaintext);
println!("Ciphertext:\t{:08X}{:08X}{:08X}{:08X}{:08X}{:08X}{:08X}{:08X}{:08X}{:08X}{:08X}{:08X}",
ciphertext[0][0].get(), ciphertext[0][1].get(), ciphertext[0][2].get(), ciphertext[0][3].get(),
ciphertext[1][0].get(), ciphertext[1][1].get(), ciphertext[1][2].get(), ciphertext[1][3].get(),
ciphertext[2][0].get(), ciphertext[2][1].get(), ciphertext[2][2].get(), ciphertext[2][3].get());
println!("Plaintext:\t{:08X}{:08X}{:08X}{:08X}{:08X}{:08X}{:08X}{:08X}{:08X}{:08X}{:08X}{:08X}",
plaintext[0][0].get(), plaintext[0][1].get(), plaintext[0][2].get(), plaintext[0][3].get(),
plaintext[1][0].get(), plaintext[1][1].get(), plaintext[1][2].get(), plaintext[1][3].get(),
plaintext[2][0].get(), plaintext[2][1].get(), plaintext[2][2].get(), plaintext[2][3].get());
assert_eq!(plaintext[0][0].get(), 0x90ABCDEF);
assert_eq!(plaintext[0][1].get(), 0x12345678);
assert_eq!(plaintext[0][2].get(), 0x90ABCDEF);
assert_eq!(plaintext[0][3].get(), 0x12345678);
assert_eq!(plaintext[1][0].get(), 0x90ABCDEF);
assert_eq!(plaintext[1][1].get(), 0x12345678);
assert_eq!(plaintext[1][2].get(), 0x90ABCDEF);
assert_eq!(plaintext[1][3].get(), 0x12345678);
assert_eq!(plaintext[2][0].get(), 0x90ABCDEF);
assert_eq!(plaintext[2][1].get(), 0x12345678);
assert_eq!(plaintext[2][2].get(), 0x90ABCDEF);
assert_eq!(plaintext[2][3].get(), 0x12345678);§For more examples,
click here
Sourcepub fn decrypt_array_u128<const N: usize>(
&mut self,
cipher: &[u128; N],
message: &mut [u128; N],
)
pub fn decrypt_array_u128<const N: usize>( &mut self, cipher: &[u128; N], message: &mut [u128; N], )
Decrypts an array of 128-bit data.
§Arguments
cipheris of an array ofu128-type and the ciphertext to be decrypted.messageis of an array ofu128-type and the plaintext to be stored.
§Features
This method decrypts multiple of 64-bit data without padding anything in ECB (Electronic CodeBook) mode.
§Caution
- This method is meaningful only when
NBis4. - If
NBis other than4, this method may panic. - Even if this method does not panic, its behaviour is not defined.
§Caution
- This method is meaningful only when
NBis4. - If
NBis other than4, this method may panic. - Even if this method does not panic, its behaviour is not defined.
§Counterpart Methods
For each trait
ECB_PKCS7,
ECB_ISO,
CBC_PKCS7,
CBC_ISO,
PCBC_PKCS7,
PCBC_ISO.
CFB,
OFB, and
CTR,
there are provided useful counterpart methods:
decrypt(), decrypt_into_vec(), decrypt_into_array(),
decrypt_into_string(),
decrypt_vec(), decrypt_vec_into_vec(), decrypt_vec_into_array(),
decrypt_vec_into_string(),
decrypt_array(), decrypt_array_into_vec(), decrypt_array_into_array(),
and decrypt_array_into_string().
§Example 1 for AES_128
use cryptocol::number::IntUnion;
use cryptocol::symmetric::AES_128;
let mut aes = AES_128::new_with_key(&[0x12, 0x34, 0x56, 0x78, 0x90, 0xAB, 0xCD, 0xEF, 0x12, 0x34, 0x56, 0x78, 0x90, 0xAB, 0xCD, 0xEF]);
let plaintext = [0x1234567890ABCDEF1234567890ABCDEF_u128, 0x11223344556677889900AABBCCDDEEFF, 0xFFEEDDCCBBAA00998877665544332211];
println!("Plaintext:\t{:#034X} {:#034X} {:#034X}", plaintext[0], plaintext[1], plaintext[2]);
let mut ciphertext = [0_u128; 3];
aes.encrypt_array_u128(&plaintext, &mut ciphertext);
println!("Ciphertext:\t{:#034X} {:#034X} {:#034X}", ciphertext[0], ciphertext[1], ciphertext[2]);
assert_eq!(ciphertext[0], 0x01CCF8264AECB5D644E2BAE927584D87_u128);
assert_eq!(ciphertext[1], 0x7601C1D6EA61791544C28D4004577BB9_u128);
assert_eq!(ciphertext[2], 0xB7225E77C077541D5055FE9C8D3894B9_u128);
let mut recovered = [0_u128; 3];
aes.decrypt_array_u128(&ciphertext, &mut recovered);
println!("Recovered:\t{:#034X} {:#034X} {:#034X}", recovered[0], recovered[1], recovered[2]);
assert_eq!(recovered[0], 0x1234567890ABCDEF1234567890ABCDEF_u128);
assert_eq!(recovered[1], 0x11223344556677889900AABBCCDDEEFF_u128);
assert_eq!(recovered[2], 0xFFEEDDCCBBAA00998877665544332211_u128);
assert_eq!(recovered[0], plaintext[0]);
assert_eq!(recovered[1], plaintext[1]);
assert_eq!(recovered[2], plaintext[2]);§For more examples,
click here
Sourcepub fn decrypt_array_u64<const N: usize>(
&mut self,
cipher: &[u64; N],
message: &mut [u64; N],
)
pub fn decrypt_array_u64<const N: usize>( &mut self, cipher: &[u64; N], message: &mut [u64; N], )
Decrypts an array of 64-bit data.
§Arguments
cipheris of an array ofu64-type and the ciphertext to be decrypted.messageis of an array ofu64-type and the plaintext to be stored.
§Features
This method encrypts multiple of 64-bit data without padding anything in ECB (Electronic CodeBook) mode.
§Caution
- This method is meaningful only when
NBis2. - If
NBis other than2, this method may panic. - Even if this method does not panic, its behaviour is not defined.
§Counterpart Methods
For each trait
ECB_PKCS7,
ECB_ISO,
CBC_PKCS7,
CBC_ISO,
PCBC_PKCS7,
PCBC_ISO.
CFB,
OFB, and
CTR,
there are provided useful counterpart methods:
decrypt(), decrypt_into_vec(), decrypt_into_array(),
decrypt_into_string(),
decrypt_vec(), decrypt_vec_into_vec(), decrypt_vec_into_array(),
decrypt_vec_into_string(),
decrypt_array(), decrypt_array_into_vec(), decrypt_array_into_array(),
and decrypt_array_into_string().
§Example 1 for Rijndael_64_64
use cryptocol::symmetric::Rijndael_64_64;
let mut rijndael = Rijndael_64_64::new_with_key(&[0x12, 0x34, 0x56, 0x78, 0x90, 0xAB, 0xCD, 0xEF]);
let plaintext = [0x1234567890ABCDEF_u64, 0x1122334455667788, 0xFFEEDDCCBBAA0099];
println!("Plaintext:\t{:#018X} {:#018X} {:#018X}", plaintext[0], plaintext[1], plaintext[2]);
let mut ciphertext = [0_u64; 3];
rijndael.encrypt_array_u64(&plaintext, &mut ciphertext);
println!("Ciphertext:\t{:#018X} {:#018X} {:#018X}", ciphertext[0], ciphertext[1], ciphertext[2]);
assert_eq!(ciphertext[0], 0x4FAA3F0E49CC4DCF_u64);
assert_eq!(ciphertext[1], 0x036AAEDC0F1A5BEC_u64);
assert_eq!(ciphertext[2], 0x99B8209339BCC1EB_u64);
let mut recovered = [0_u64; 3];
rijndael.decrypt_array_u64(&ciphertext, &mut recovered);
println!("Recovered:\t{:#018X} {:#018X} {:#018X}", recovered[0], recovered[1], recovered[2]);
assert_eq!(recovered[0], 0x1234567890ABCDEF_u64);
assert_eq!(recovered[1], 0x1122334455667788_u64);
assert_eq!(recovered[2], 0xFFEEDDCCBBAA0099_u64);
assert_eq!(recovered[0], plaintext[0]);
assert_eq!(recovered[1], plaintext[1]);
assert_eq!(recovered[2], plaintext[2]);§For more examples,
click here
Sourcepub fn decrypt_array_u32<const N: usize>(
&mut self,
cipher: &[u32; N],
message: &mut [u32; N],
)
pub fn decrypt_array_u32<const N: usize>( &mut self, cipher: &[u32; N], message: &mut [u32; N], )
Decrypts an array of 32-bit data.
§Arguments
cipheris of an array ofu32-type and the ciphertext to be decrypted.messageis of an array ofu32-type and the plaintext to be stored.
§Features
This method encrypts multiple of 32-bit data without padding anything in ECB (Electronic CodeBook) mode.
§Caution
- This method is meaningful only when
NBis1. - If
NBis other than1, this method may panic. - Even if this method does not panic, its behaviour is not defined.
§Counterpart Methods
For each trait
ECB_PKCS7,
ECB_ISO,
CBC_PKCS7,
CBC_ISO,
PCBC_PKCS7,
PCBC_ISO.
CFB,
OFB, and
CTR,
there are provided useful counterpart methods:
decrypt(), decrypt_into_vec(), decrypt_into_array(),
decrypt_into_string(),
decrypt_vec(), decrypt_vec_into_vec(), decrypt_vec_into_array(),
decrypt_vec_into_string(),
decrypt_array(), decrypt_array_into_vec(), decrypt_array_into_array(),
and decrypt_array_into_string().
§Example 1 for Rijndael_32_32
use cryptocol::symmetric::Rijndael_32_32;
let mut rijndael = Rijndael_32_32::new_with_key(&[0x12, 0x34, 0x56, 0x78, 0x90, 0xAB, 0xCD, 0xEF]);
let plaintext = [0x12345678_u32, 0x90ABCDEF, 0xFFEEDDCC];
println!("Plaintext:\t{:#010X} {:#010X} {:#010X}", plaintext[0], plaintext[1], plaintext[2]);
let mut ciphertext = [0_u32; 3];
rijndael.encrypt_array_u32(&plaintext, &mut ciphertext);
println!("Ciphertext:\t{:#010X} {:#010X} {:#010X}", ciphertext[0], ciphertext[1], ciphertext[2]);
assert_eq!(ciphertext[0], 0x335228F6_u32);
assert_eq!(ciphertext[1], 0xBFB99AFB_u32);
assert_eq!(ciphertext[2], 0x2D114838_u32);
let mut recovered = [0_u32; 3];
rijndael.decrypt_array_u32(&ciphertext, &mut recovered);
println!("Recovered:\t{:#010X} {:#010X} {:#010X}", recovered[0], recovered[1], recovered[2]);
assert_eq!(recovered[0], 0x12345678_u32);
assert_eq!(recovered[1], 0x90ABCDEF_u32);
assert_eq!(recovered[2], 0xFFEEDDCC_u32);
assert_eq!(recovered[0], plaintext[0]);
assert_eq!(recovered[1], plaintext[1]);
assert_eq!(recovered[2], plaintext[2]);§For more examples,
click here
Sourcepub fn is_successful(&self) -> bool
pub fn is_successful(&self) -> bool
Checks whether the previous encryption or decryption was successful.
§Output
If the previous encryption or decryption was successful, this method returns true. Otherwise, it returns false.
§Features
- Usually, you don’t have to use this method because the encryption
methods returns the length of ciphertext and the decryption methods
returns the length of plaintext but they returns
0when they failed. - If the ciphertext is 8 bytes for decryption with the padding either
pkcs7 or iso, the return value
0of the decryption methods is not discriminatory. You don’t know whether the previous decryption was failed or the original plaintext was just null string or “”. In this case you can check its success with this method.
§Example 1 for the message of 0 bytes
use std::io::Write;
use std::fmt::Write as _;
use cryptocol::symmetric::{ AES_128, ECB_PKCS7 };
let key = 0xEFCDAB9078563412EFCDAB9078563412_u128;
println!("K =\t{:#034X}", key);
let mut a_aes = AES_128::new_with_key_u128(key);
let message = "";
println!("M =\t{}", message);
let mut cipher = [0_u8; 16];
let len = a_aes.encrypt_into_array(message.as_ptr(), message.len() as u64, &mut cipher);
println!("The length of ciphertext = {}", len);
assert_eq!(len, 16);
let success = a_aes.is_successful();
assert_eq!(success, true);
print!("C =\t");
for c in cipher.clone()
{ print!("{:02X} ", c); }
println!();
let mut txt = String::new();
for c in cipher.clone()
{ write!(txt, "{:02X} ", c); }
assert_eq!(txt, "26 F2 F8 B7 B7 FD 46 9A 97 97 F3 24 E7 51 99 47 ");§For more examples,
click here
Sourcepub fn is_failed(&self) -> bool
pub fn is_failed(&self) -> bool
Checks whether the previous encryption or decryption was failed.
§Output
If the previous encryption or decryption was failed, this method returns true. Otherwise, it returns false.
§Features
- Usually, you don’t have to use this method because the encryption
methods returns the length of ciphertext and the decryption methods
returns the length of plaintext but they returns
0when they failed. - If the ciphertext is 8 bytes for decryption with the padding either
pkcs7 or iso, the return value
0of the decryption methods is not discriminatory. You don’t know whether the previous decryption was failed or the original plaintext was just null string or “”. In this case you can check its success with this method.
§Example 1 for the message of 0 bytes
use std::io::Write;
use std::fmt::Write as _;
use cryptocol::symmetric::{ AES_128, ECB_PKCS7 };
let key = 0xEFCDAB9078563412EFCDAB9078563412_u128;
println!("K =\t{:#034X}", key);
let mut a_aes = AES_128::new_with_key_u128(key);
let message = "";
println!("M =\t{}", message);
let mut cipher = [0_u8; 16];
let len = a_aes.encrypt_into_array(message.as_ptr(), message.len() as u64, &mut cipher);
println!("The length of ciphertext = {}", len);
assert_eq!(len, 16);
let failure = a_aes.is_failed();
assert_eq!(failure, false);
print!("C =\t");
for c in cipher.clone()
{ print!("{:02X} ", c); }
println!();
let mut txt = String::new();
for c in cipher.clone()
{ write!(txt, "{:02X} ", c); }
assert_eq!(txt, "26 F2 F8 B7 B7 FD 46 9A 97 97 F3 24 E7 51 99 47 ");§For more examples,
click here
Sourcepub fn get_desirable_round() -> usize
pub fn get_desirable_round() -> usize
Returns the desirable number of rounds according to the Rijndael documents
§Example 1 for AES_128
use cryptocol::symmetric::AES_128;
let rounds = AES_128::get_desirable_round();
println!("The desirable number of rounds of AES_128 is {}", rounds);
assert_eq!(rounds, 10);§For more examples,
click here
Trait Implementations§
Source§impl<S, const ROUND: usize, const NK: usize, const IRREDUCIBLE: u8, const AFFINE_MUL: u64, const AFFINE_ADD: u8, const SR0: usize, const SR1: usize, const SR2: usize, const SR3: usize, const MC00: u8, const MC01: u8, const MC02: u8, const MC03: u8, const MC10: u8, const MC11: u8, const MC12: u8, const MC13: u8, const MC20: u8, const MC21: u8, const MC22: u8, const MC23: u8, const MC30: u8, const MC31: u8, const MC32: u8, const MC33: u8, const RC0: u32, const RC1: u32, const RC2: u32, const RC3: u32, const RC4: u32, const RC5: u32, const RC6: u32, const RC7: u32, const RC8: u32, const RC9: u32, const ROT: u32> Add<S> for Rijndael_Generic<ROUND, 2, NK, IRREDUCIBLE, AFFINE_MUL, AFFINE_ADD, SR0, SR1, SR2, SR3, MC00, MC01, MC02, MC03, MC10, MC11, MC12, MC13, MC20, MC21, MC22, MC23, MC30, MC31, MC32, MC33, RC0, RC1, RC2, RC3, RC4, RC5, RC6, RC7, RC8, RC9, ROT>where
S: SmallCryptor64 + 'static,
impl<S, const ROUND: usize, const NK: usize, const IRREDUCIBLE: u8, const AFFINE_MUL: u64, const AFFINE_ADD: u8, const SR0: usize, const SR1: usize, const SR2: usize, const SR3: usize, const MC00: u8, const MC01: u8, const MC02: u8, const MC03: u8, const MC10: u8, const MC11: u8, const MC12: u8, const MC13: u8, const MC20: u8, const MC21: u8, const MC22: u8, const MC23: u8, const MC30: u8, const MC31: u8, const MC32: u8, const MC33: u8, const RC0: u32, const RC1: u32, const RC2: u32, const RC3: u32, const RC4: u32, const RC5: u32, const RC6: u32, const RC7: u32, const RC8: u32, const RC9: u32, const ROT: u32> Add<S> for Rijndael_Generic<ROUND, 2, NK, IRREDUCIBLE, AFFINE_MUL, AFFINE_ADD, SR0, SR1, SR2, SR3, MC00, MC01, MC02, MC03, MC10, MC11, MC12, MC13, MC20, MC21, MC22, MC23, MC30, MC31, MC32, MC33, RC0, RC1, RC2, RC3, RC4, RC5, RC6, RC7, RC8, RC9, ROT>where
S: SmallCryptor64 + 'static,
Source§impl<S, const ROUND: usize, const NK: usize, const IRREDUCIBLE: u8, const AFFINE_MUL: u64, const AFFINE_ADD: u8, const SR0: usize, const SR1: usize, const SR2: usize, const SR3: usize, const MC00: u8, const MC01: u8, const MC02: u8, const MC03: u8, const MC10: u8, const MC11: u8, const MC12: u8, const MC13: u8, const MC20: u8, const MC21: u8, const MC22: u8, const MC23: u8, const MC30: u8, const MC31: u8, const MC32: u8, const MC33: u8, const RC0: u32, const RC1: u32, const RC2: u32, const RC3: u32, const RC4: u32, const RC5: u32, const RC6: u32, const RC7: u32, const RC8: u32, const RC9: u32, const ROT: u32> Add<S> for Rijndael_Generic<ROUND, 4, NK, IRREDUCIBLE, AFFINE_MUL, AFFINE_ADD, SR0, SR1, SR2, SR3, MC00, MC01, MC02, MC03, MC10, MC11, MC12, MC13, MC20, MC21, MC22, MC23, MC30, MC31, MC32, MC33, RC0, RC1, RC2, RC3, RC4, RC5, RC6, RC7, RC8, RC9, ROT>where
S: SmallCryptor128 + 'static,
impl<S, const ROUND: usize, const NK: usize, const IRREDUCIBLE: u8, const AFFINE_MUL: u64, const AFFINE_ADD: u8, const SR0: usize, const SR1: usize, const SR2: usize, const SR3: usize, const MC00: u8, const MC01: u8, const MC02: u8, const MC03: u8, const MC10: u8, const MC11: u8, const MC12: u8, const MC13: u8, const MC20: u8, const MC21: u8, const MC22: u8, const MC23: u8, const MC30: u8, const MC31: u8, const MC32: u8, const MC33: u8, const RC0: u32, const RC1: u32, const RC2: u32, const RC3: u32, const RC4: u32, const RC5: u32, const RC6: u32, const RC7: u32, const RC8: u32, const RC9: u32, const ROT: u32> Add<S> for Rijndael_Generic<ROUND, 4, NK, IRREDUCIBLE, AFFINE_MUL, AFFINE_ADD, SR0, SR1, SR2, SR3, MC00, MC01, MC02, MC03, MC10, MC11, MC12, MC13, MC20, MC21, MC22, MC23, MC30, MC31, MC32, MC33, RC0, RC1, RC2, RC3, RC4, RC5, RC6, RC7, RC8, RC9, ROT>where
S: SmallCryptor128 + 'static,
Source§impl<const ROUND: usize, const NB: usize, const NK: usize, const IRREDUCIBLE: u8, const AFFINE_MUL: u64, const AFFINE_ADD: u8, const SR0: usize, const SR1: usize, const SR2: usize, const SR3: usize, const MC00: u8, const MC01: u8, const MC02: u8, const MC03: u8, const MC10: u8, const MC11: u8, const MC12: u8, const MC13: u8, const MC20: u8, const MC21: u8, const MC22: u8, const MC23: u8, const MC30: u8, const MC31: u8, const MC32: u8, const MC33: u8, const RC0: u32, const RC1: u32, const RC2: u32, const RC3: u32, const RC4: u32, const RC5: u32, const RC6: u32, const RC7: u32, const RC8: u32, const RC9: u32, const ROT: u32> CBC_ISO<[u32; NB]> for Rijndael_Generic<ROUND, NB, NK, IRREDUCIBLE, AFFINE_MUL, AFFINE_ADD, SR0, SR1, SR2, SR3, MC00, MC01, MC02, MC03, MC10, MC11, MC12, MC13, MC20, MC21, MC22, MC23, MC30, MC31, MC32, MC33, RC0, RC1, RC2, RC3, RC4, RC5, RC6, RC7, RC8, RC9, ROT>
impl<const ROUND: usize, const NB: usize, const NK: usize, const IRREDUCIBLE: u8, const AFFINE_MUL: u64, const AFFINE_ADD: u8, const SR0: usize, const SR1: usize, const SR2: usize, const SR3: usize, const MC00: u8, const MC01: u8, const MC02: u8, const MC03: u8, const MC10: u8, const MC11: u8, const MC12: u8, const MC13: u8, const MC20: u8, const MC21: u8, const MC22: u8, const MC23: u8, const MC30: u8, const MC31: u8, const MC32: u8, const MC33: u8, const RC0: u32, const RC1: u32, const RC2: u32, const RC3: u32, const RC4: u32, const RC5: u32, const RC6: u32, const RC7: u32, const RC8: u32, const RC9: u32, const ROT: u32> CBC_ISO<[u32; NB]> for Rijndael_Generic<ROUND, NB, NK, IRREDUCIBLE, AFFINE_MUL, AFFINE_ADD, SR0, SR1, SR2, SR3, MC00, MC01, MC02, MC03, MC10, MC11, MC12, MC13, MC20, MC21, MC22, MC23, MC30, MC31, MC32, MC33, RC0, RC1, RC2, RC3, RC4, RC5, RC6, RC7, RC8, RC9, ROT>
Source§fn encrypt(
&mut self,
iv: [u32; NB],
message: *const u8,
length_in_bytes: u64,
cipher: *mut u8,
) -> u64
fn encrypt( &mut self, iv: [u32; NB], message: *const u8, length_in_bytes: u64, cipher: *mut u8, ) -> u64
Source§fn decrypt(
&mut self,
iv: [u32; NB],
cipher: *const u8,
length_in_bytes: u64,
message: *mut u8,
) -> u64
fn decrypt( &mut self, iv: [u32; NB], cipher: *const u8, length_in_bytes: u64, message: *mut u8, ) -> u64
Source§fn encrypt_into_array<U, const N: usize>(
&mut self,
iv: [u32; NB],
message: *const u8,
length_in_bytes: u64,
cipher: &mut [U; N],
) -> u64where
U: SmallUInt,
fn encrypt_into_array<U, const N: usize>(
&mut self,
iv: [u32; NB],
message: *const u8,
length_in_bytes: u64,
cipher: &mut [U; N],
) -> u64where
U: SmallUInt,
[U; N]. Read moreSource§fn encrypt_into_vec<U>(
&mut self,
iv: [u32; NB],
message: *const u8,
length_in_bytes: u64,
cipher: &mut Vec<U>,
) -> u64where
U: SmallUInt,
fn encrypt_into_vec<U>(
&mut self,
iv: [u32; NB],
message: *const u8,
length_in_bytes: u64,
cipher: &mut Vec<U>,
) -> u64where
U: SmallUInt,
Vec<U>. Read moreSource§fn decrypt_into_array<U, const N: usize>(
&mut self,
iv: [u32; NB],
cipher: *const u8,
length_in_bytes: u64,
message: &mut [U; N],
) -> u64where
U: SmallUInt,
fn decrypt_into_array<U, const N: usize>(
&mut self,
iv: [u32; NB],
cipher: *const u8,
length_in_bytes: u64,
message: &mut [U; N],
) -> u64where
U: SmallUInt,
[U; N]. Read moreSource§fn encrypt_str(&mut self, iv: T, message: &str, cipher: *mut u8) -> u64
fn encrypt_str(&mut self, iv: T, message: &str, cipher: *mut u8) -> u64
str object with the padding defined
according to ISO 7816-4 in CBC (Cipher-Block Chaining) mode. Read moreSource§fn encrypt_str_into_vec<U>(
&mut self,
iv: T,
message: &str,
cipher: &mut Vec<U>,
) -> u64where
U: SmallUInt,
fn encrypt_str_into_vec<U>(
&mut self,
iv: T,
message: &str,
cipher: &mut Vec<U>,
) -> u64where
U: SmallUInt,
str with the padding defined according to
ISO 7816-4 in CBC (Cipher-Block Chaining) mode, and stores the
encrypted data in Vec<U>. Read moreSource§fn encrypt_str_into_array<U, const N: usize>(
&mut self,
iv: T,
message: &str,
cipher: &mut [U; N],
) -> u64where
U: SmallUInt,
fn encrypt_str_into_array<U, const N: usize>(
&mut self,
iv: T,
message: &str,
cipher: &mut [U; N],
) -> u64where
U: SmallUInt,
str object with the padding defined
according to ISO 7816-4 in CBC (Cipher-Block Chaining) mode,
and stores the encrypted data in array [U; N]. Read moreSource§fn encrypt_string(&mut self, iv: T, message: &String, cipher: *mut u8) -> u64
fn encrypt_string(&mut self, iv: T, message: &String, cipher: *mut u8) -> u64
String object with the padding
according to ISO 7816-4 in CBC (Cipher-Block Chaining) mode. Read moreSource§fn encrypt_string_into_vec<U>(
&mut self,
iv: T,
message: &String,
cipher: &mut Vec<U>,
) -> u64where
U: SmallUInt,
fn encrypt_string_into_vec<U>(
&mut self,
iv: T,
message: &String,
cipher: &mut Vec<U>,
) -> u64where
U: SmallUInt,
String object with the padding
according to ISO 7816-4 in CBC (Cipher-Block Chaining) mode,
and stores the encrypted data in Vec<U>. Read moreSource§fn encrypt_string_into_array<U, const N: usize>(
&mut self,
iv: T,
message: &String,
cipher: &mut [U; N],
) -> u64where
U: SmallUInt,
fn encrypt_string_into_array<U, const N: usize>(
&mut self,
iv: T,
message: &String,
cipher: &mut [U; N],
) -> u64where
U: SmallUInt,
String object with the padding
according to ISO 7816-4 in CBC (Cipher-Block Chaining) mode,
and stores the encrypted data in array [U; N]. Read moreSource§fn encrypt_vec<U>(&mut self, iv: T, message: &Vec<U>, cipher: *mut u8) -> u64where
U: SmallUInt,
fn encrypt_vec<U>(&mut self, iv: T, message: &Vec<U>, cipher: *mut u8) -> u64where
U: SmallUInt,
Vec<U> object with the padding defined
according to ISO 7816-4 in CBC (Cipher-Block Chaining) mode. Read moreSource§fn encrypt_vec_into_vec<U, V>(
&mut self,
iv: T,
message: &Vec<U>,
cipher: &mut Vec<V>,
) -> u64
fn encrypt_vec_into_vec<U, V>( &mut self, iv: T, message: &Vec<U>, cipher: &mut Vec<V>, ) -> u64
Vec<U> object with the padding defined
according to ISO 7816-4 in CBC (Cipher-Block Chaining) mode, and
stores the encrypted data in Vec<V>. Read moreSource§fn encrypt_vec_into_array<U, V, const N: usize>(
&mut self,
iv: T,
message: &Vec<U>,
cipher: &mut [V; N],
) -> u64
fn encrypt_vec_into_array<U, V, const N: usize>( &mut self, iv: T, message: &Vec<U>, cipher: &mut [V; N], ) -> u64
Vec<U> object with the padding defined
according to ISO 7816-4 in CBC (Cipher-Block Chaining) mode, and
stores the encrypted data in array [V; N]. Read moreSource§fn encrypt_array<U, const N: usize>(
&mut self,
iv: T,
message: &[U; N],
cipher: *mut u8,
) -> u64where
U: SmallUInt,
fn encrypt_array<U, const N: usize>(
&mut self,
iv: T,
message: &[U; N],
cipher: *mut u8,
) -> u64where
U: SmallUInt,
[U; N] object with the padding
defined according to ISO 7816-4 in CBC (Cipher-Block Chaining) mode. Read moreSource§fn encrypt_array_into_vec<U, V, const N: usize>(
&mut self,
iv: T,
message: &[U; N],
cipher: &mut Vec<V>,
) -> u64
fn encrypt_array_into_vec<U, V, const N: usize>( &mut self, iv: T, message: &[U; N], cipher: &mut Vec<V>, ) -> u64
[U; N] object with the padding
according to ISO 7816-4 in CBC (Cipher-Block Chaining) mode, and stores the
encrypted data in Vec<V>. Read moreSource§fn encrypt_array_into_array<U, V, const N: usize, const M: usize>(
&mut self,
iv: T,
message: &[U; N],
cipher: &mut [V; M],
) -> u64
fn encrypt_array_into_array<U, V, const N: usize, const M: usize>( &mut self, iv: T, message: &[U; N], cipher: &mut [V; M], ) -> u64
[U; N] object with the padding
according to ISO 7816-4 in CBC (Cipher-Block Chaining) mode, and stores the
encrypted data in array [V; M]. Read moreSource§fn decrypt_into_vec<U>(
&mut self,
iv: T,
cipher: *const u8,
length_in_bytes: u64,
message: &mut Vec<U>,
) -> u64where
U: SmallUInt,
fn decrypt_into_vec<U>(
&mut self,
iv: T,
cipher: *const u8,
length_in_bytes: u64,
message: &mut Vec<U>,
) -> u64where
U: SmallUInt,
Vec<U>. Read moreSource§fn decrypt_into_string(
&mut self,
iv: T,
cipher: *const u8,
length_in_bytes: u64,
message: &mut String,
) -> u64
fn decrypt_into_string( &mut self, iv: T, cipher: *const u8, length_in_bytes: u64, message: &mut String, ) -> u64
String. Read moreSource§fn decrypt_vec<U>(&mut self, iv: T, cipher: &Vec<U>, message: *mut u8) -> u64where
U: SmallUInt,
fn decrypt_vec<U>(&mut self, iv: T, cipher: &Vec<U>, message: *mut u8) -> u64where
U: SmallUInt,
Vec<U> object with the padding defined
according to ISO 7816-4 in CBC (Cipher-Block Chaining) mode. Read moreSource§fn decrypt_vec_into_vec<U, V>(
&mut self,
iv: T,
cipher: &Vec<U>,
message: &mut Vec<V>,
) -> u64
fn decrypt_vec_into_vec<U, V>( &mut self, iv: T, cipher: &Vec<U>, message: &mut Vec<V>, ) -> u64
Vec<U> object with the padding defined
according to ISO 7816-4 in CBC (Cipher-Block Chaining) mode, and
stores the decrypted data in Vec<V>. Read moreSource§fn decrypt_vec_into_array<U, V, const N: usize>(
&mut self,
iv: T,
cipher: &Vec<U>,
message: &mut [V; N],
) -> u64
fn decrypt_vec_into_array<U, V, const N: usize>( &mut self, iv: T, cipher: &Vec<U>, message: &mut [V; N], ) -> u64
Vec<U> object with the padding defined
according to ISO 7816-4 in CBC (Cipher-Block Chaining) mode, and
stores the decrypted data in array [V; N]. Read moreSource§fn decrypt_vec_into_string<U>(
&mut self,
iv: T,
cipher: &Vec<U>,
message: &mut String,
) -> u64where
U: SmallUInt,
fn decrypt_vec_into_string<U>(
&mut self,
iv: T,
cipher: &Vec<U>,
message: &mut String,
) -> u64where
U: SmallUInt,
str with the padding defined according to
ISO 7816-4 in CBC (Cipher-Block Chaining) mode, and stores the
decrypted data in String. Read moreSource§fn decrypt_array<U, const N: usize>(
&mut self,
iv: T,
cipher: &[U; N],
message: *mut u8,
) -> u64where
U: SmallUInt,
fn decrypt_array<U, const N: usize>(
&mut self,
iv: T,
cipher: &[U; N],
message: *mut u8,
) -> u64where
U: SmallUInt,
[U; N] object with the padding
defined according to ISO 7816-4 in CBC (Cipher-Block Chaining) mode. Read moreSource§fn decrypt_array_into_vec<U, V, const N: usize>(
&mut self,
iv: T,
cipher: &[U; N],
message: &mut Vec<V>,
) -> u64
fn decrypt_array_into_vec<U, V, const N: usize>( &mut self, iv: T, cipher: &[U; N], message: &mut Vec<V>, ) -> u64
[U; N] object with the padding
defined according to ISO 7816-4 in CBC (Cipher-Block Chaining) mode,
and stores the decrypted data in Vec<V>. Read moreSource§fn decrypt_array_into_array<U, V, const N: usize, const M: usize>(
&mut self,
iv: T,
cipher: &[U; N],
message: &mut [V; M],
) -> u64
fn decrypt_array_into_array<U, V, const N: usize, const M: usize>( &mut self, iv: T, cipher: &[U; N], message: &mut [V; M], ) -> u64
[U; N] object with the padding
defined according to ISO 7816-4 in CBC (Cipher-Block Chaining) mode,
and stores the decrypted data in array [V; M]. Read moreSource§fn decrypt_array_into_string<U, const N: usize>(
&mut self,
iv: T,
cipher: &[U; N],
message: &mut String,
) -> u64where
U: SmallUInt,
fn decrypt_array_into_string<U, const N: usize>(
&mut self,
iv: T,
cipher: &[U; N],
message: &mut String,
) -> u64where
U: SmallUInt,
[U; N] object with the padding
defined according to ISO 7816-4 in CBC (Cipher-Block Chaining) mode,
and stores the decrypted data in String. Read moreSource§impl<const ROUND: usize, const NB: usize, const NK: usize, const IRREDUCIBLE: u8, const AFFINE_MUL: u64, const AFFINE_ADD: u8, const SR0: usize, const SR1: usize, const SR2: usize, const SR3: usize, const MC00: u8, const MC01: u8, const MC02: u8, const MC03: u8, const MC10: u8, const MC11: u8, const MC12: u8, const MC13: u8, const MC20: u8, const MC21: u8, const MC22: u8, const MC23: u8, const MC30: u8, const MC31: u8, const MC32: u8, const MC33: u8, const RC0: u32, const RC1: u32, const RC2: u32, const RC3: u32, const RC4: u32, const RC5: u32, const RC6: u32, const RC7: u32, const RC8: u32, const RC9: u32, const ROT: u32> CBC_PKCS7<[u32; NB]> for Rijndael_Generic<ROUND, NB, NK, IRREDUCIBLE, AFFINE_MUL, AFFINE_ADD, SR0, SR1, SR2, SR3, MC00, MC01, MC02, MC03, MC10, MC11, MC12, MC13, MC20, MC21, MC22, MC23, MC30, MC31, MC32, MC33, RC0, RC1, RC2, RC3, RC4, RC5, RC6, RC7, RC8, RC9, ROT>
impl<const ROUND: usize, const NB: usize, const NK: usize, const IRREDUCIBLE: u8, const AFFINE_MUL: u64, const AFFINE_ADD: u8, const SR0: usize, const SR1: usize, const SR2: usize, const SR3: usize, const MC00: u8, const MC01: u8, const MC02: u8, const MC03: u8, const MC10: u8, const MC11: u8, const MC12: u8, const MC13: u8, const MC20: u8, const MC21: u8, const MC22: u8, const MC23: u8, const MC30: u8, const MC31: u8, const MC32: u8, const MC33: u8, const RC0: u32, const RC1: u32, const RC2: u32, const RC3: u32, const RC4: u32, const RC5: u32, const RC6: u32, const RC7: u32, const RC8: u32, const RC9: u32, const ROT: u32> CBC_PKCS7<[u32; NB]> for Rijndael_Generic<ROUND, NB, NK, IRREDUCIBLE, AFFINE_MUL, AFFINE_ADD, SR0, SR1, SR2, SR3, MC00, MC01, MC02, MC03, MC10, MC11, MC12, MC13, MC20, MC21, MC22, MC23, MC30, MC31, MC32, MC33, RC0, RC1, RC2, RC3, RC4, RC5, RC6, RC7, RC8, RC9, ROT>
Source§fn encrypt(
&mut self,
iv: [u32; NB],
message: *const u8,
length_in_bytes: u64,
cipher: *mut u8,
) -> u64
fn encrypt( &mut self, iv: [u32; NB], message: *const u8, length_in_bytes: u64, cipher: *mut u8, ) -> u64
Source§fn decrypt(
&mut self,
iv: [u32; NB],
cipher: *const u8,
length_in_bytes: u64,
message: *mut u8,
) -> u64
fn decrypt( &mut self, iv: [u32; NB], cipher: *const u8, length_in_bytes: u64, message: *mut u8, ) -> u64
Source§fn encrypt_into_array<U, const N: usize>(
&mut self,
iv: [u32; NB],
message: *const u8,
length_in_bytes: u64,
cipher: &mut [U; N],
) -> u64where
U: SmallUInt,
fn encrypt_into_array<U, const N: usize>(
&mut self,
iv: [u32; NB],
message: *const u8,
length_in_bytes: u64,
cipher: &mut [U; N],
) -> u64where
U: SmallUInt,
[U; N]. Read moreSource§fn encrypt_into_vec<U>(
&mut self,
iv: [u32; NB],
message: *const u8,
length_in_bytes: u64,
cipher: &mut Vec<U>,
) -> u64where
U: SmallUInt,
fn encrypt_into_vec<U>(
&mut self,
iv: [u32; NB],
message: *const u8,
length_in_bytes: u64,
cipher: &mut Vec<U>,
) -> u64where
U: SmallUInt,
Vec<U>. Read moreSource§fn decrypt_into_array<U, const N: usize>(
&mut self,
iv: [u32; NB],
cipher: *const u8,
length_in_bytes: u64,
message: &mut [U; N],
) -> u64where
U: SmallUInt,
fn decrypt_into_array<U, const N: usize>(
&mut self,
iv: [u32; NB],
cipher: *const u8,
length_in_bytes: u64,
message: &mut [U; N],
) -> u64where
U: SmallUInt,
[U; N]. Read moreSource§fn encrypt_str(&mut self, iv: T, message: &str, cipher: *mut u8) -> u64
fn encrypt_str(&mut self, iv: T, message: &str, cipher: *mut u8) -> u64
str object with the padding defined
according to PKCS #7 in CBC (Cipher-Block Chaining) mode. Read moreSource§fn encrypt_str_into_vec<U>(
&mut self,
iv: T,
message: &str,
cipher: &mut Vec<U>,
) -> u64where
U: SmallUInt,
fn encrypt_str_into_vec<U>(
&mut self,
iv: T,
message: &str,
cipher: &mut Vec<U>,
) -> u64where
U: SmallUInt,
str with the padding defined according to
PKCS #7 in CBC (Cipher-Block Chaining) mode, and stores the
encrypted data in Vec<U>. Read moreSource§fn encrypt_str_into_array<U, const N: usize>(
&mut self,
iv: T,
message: &str,
cipher: &mut [U; N],
) -> u64where
U: SmallUInt,
fn encrypt_str_into_array<U, const N: usize>(
&mut self,
iv: T,
message: &str,
cipher: &mut [U; N],
) -> u64where
U: SmallUInt,
str object with the padding defined
according to PKCS #7 in CBC (Cipher-Block Chaining) mode,
and stores the encrypted data in array [U; N]. Read moreSource§fn encrypt_string(&mut self, iv: T, message: &String, cipher: *mut u8) -> u64
fn encrypt_string(&mut self, iv: T, message: &String, cipher: *mut u8) -> u64
String object with the padding
according to PKCS #7 in CBC (Cipher-Block Chaining) mode. Read moreSource§fn encrypt_string_into_vec<U>(
&mut self,
iv: T,
message: &String,
cipher: &mut Vec<U>,
) -> u64where
U: SmallUInt,
fn encrypt_string_into_vec<U>(
&mut self,
iv: T,
message: &String,
cipher: &mut Vec<U>,
) -> u64where
U: SmallUInt,
String object with the padding
according to PKCS #7 in CBC (Cipher-Block Chaining) mode,
and stores the encrypted data in Vec<U>. Read moreSource§fn encrypt_string_into_array<U, const N: usize>(
&mut self,
iv: T,
message: &String,
cipher: &mut [U; N],
) -> u64where
U: SmallUInt,
fn encrypt_string_into_array<U, const N: usize>(
&mut self,
iv: T,
message: &String,
cipher: &mut [U; N],
) -> u64where
U: SmallUInt,
String object with the padding
according to PKCS #7 in CBC (Cipher-Block Chaining) mode,
and stores the encrypted data in array [U; N]. Read moreSource§fn encrypt_vec<U>(&mut self, iv: T, message: &Vec<U>, cipher: *mut u8) -> u64where
U: SmallUInt,
fn encrypt_vec<U>(&mut self, iv: T, message: &Vec<U>, cipher: *mut u8) -> u64where
U: SmallUInt,
Vec<U> object with the padding defined
according to PKCS #7 in CBC (Cipher-Block Chaining) mode. Read moreSource§fn encrypt_vec_into_vec<U, V>(
&mut self,
iv: T,
message: &Vec<U>,
cipher: &mut Vec<V>,
) -> u64
fn encrypt_vec_into_vec<U, V>( &mut self, iv: T, message: &Vec<U>, cipher: &mut Vec<V>, ) -> u64
Vec<U> object with the padding defined
according to PKCS #7 in CBC (Cipher-Block Chaining) mode, and
stores the encrypted data in Vec<V>. Read moreSource§fn encrypt_vec_into_array<U, V, const N: usize>(
&mut self,
iv: T,
message: &Vec<U>,
cipher: &mut [V; N],
) -> u64
fn encrypt_vec_into_array<U, V, const N: usize>( &mut self, iv: T, message: &Vec<U>, cipher: &mut [V; N], ) -> u64
Vec<U> object with the padding defined
according to PKCS #7 in CBC (Cipher-Block Chaining) mode, and
stores the encrypted data in array [V; N]. Read moreSource§fn encrypt_array<U, const N: usize>(
&mut self,
iv: T,
message: &[U; N],
cipher: *mut u8,
) -> u64where
U: SmallUInt,
fn encrypt_array<U, const N: usize>(
&mut self,
iv: T,
message: &[U; N],
cipher: *mut u8,
) -> u64where
U: SmallUInt,
[U; N] object with the padding
defined according to PKCS #7 in CBC (Cipher-Block Chaining) mode. Read moreSource§fn encrypt_array_into_vec<U, V, const N: usize>(
&mut self,
iv: T,
message: &[U; N],
cipher: &mut Vec<V>,
) -> u64
fn encrypt_array_into_vec<U, V, const N: usize>( &mut self, iv: T, message: &[U; N], cipher: &mut Vec<V>, ) -> u64
[U; N] object with the padding
according to PKCS #7 in CBC (Cipher-Block Chaining) mode, and stores the
encrypted data in Vec<V>. Read moreSource§fn encrypt_array_into_array<U, V, const N: usize, const M: usize>(
&mut self,
iv: T,
message: &[U; N],
cipher: &mut [V; M],
) -> u64
fn encrypt_array_into_array<U, V, const N: usize, const M: usize>( &mut self, iv: T, message: &[U; N], cipher: &mut [V; M], ) -> u64
[U; N] object with the padding
according to PKCS #7 in CBC (Cipher-Block Chaining) mode, and stores the
encrypted data in array [V; M]. Read moreSource§fn decrypt_into_vec<U>(
&mut self,
iv: T,
cipher: *const u8,
length_in_bytes: u64,
message: &mut Vec<U>,
) -> u64where
U: SmallUInt,
fn decrypt_into_vec<U>(
&mut self,
iv: T,
cipher: *const u8,
length_in_bytes: u64,
message: &mut Vec<U>,
) -> u64where
U: SmallUInt,
Vec<U>. Read moreSource§fn decrypt_into_string(
&mut self,
iv: T,
cipher: *const u8,
length_in_bytes: u64,
message: &mut String,
) -> u64
fn decrypt_into_string( &mut self, iv: T, cipher: *const u8, length_in_bytes: u64, message: &mut String, ) -> u64
String. Read moreSource§fn decrypt_vec<U>(&mut self, iv: T, cipher: &Vec<U>, message: *mut u8) -> u64where
U: SmallUInt,
fn decrypt_vec<U>(&mut self, iv: T, cipher: &Vec<U>, message: *mut u8) -> u64where
U: SmallUInt,
Vec<U> object with the padding defined
according to PKCS #7 in CBC (Cipher-Block Chaining) mode. Read moreSource§fn decrypt_vec_into_vec<U, V>(
&mut self,
iv: T,
cipher: &Vec<U>,
message: &mut Vec<V>,
) -> u64
fn decrypt_vec_into_vec<U, V>( &mut self, iv: T, cipher: &Vec<U>, message: &mut Vec<V>, ) -> u64
Vec<U> object with the padding defined
according to PKCS #7 in CBC (Cipher-Block Chaining) mode, and
stores the decrypted data in Vec<V>. Read moreSource§fn decrypt_vec_into_array<U, V, const N: usize>(
&mut self,
iv: T,
cipher: &Vec<U>,
message: &mut [V; N],
) -> u64
fn decrypt_vec_into_array<U, V, const N: usize>( &mut self, iv: T, cipher: &Vec<U>, message: &mut [V; N], ) -> u64
Vec<U> object with the padding defined
according to PKCS #7 in CBC (Cipher-Block Chaining) mode, and
stores the decrypted data in array [V; N]. Read moreSource§fn decrypt_vec_into_string<U>(
&mut self,
iv: T,
cipher: &Vec<U>,
message: &mut String,
) -> u64where
U: SmallUInt,
fn decrypt_vec_into_string<U>(
&mut self,
iv: T,
cipher: &Vec<U>,
message: &mut String,
) -> u64where
U: SmallUInt,
str with the padding defined according to
PKCS #7 in CBC (Cipher-Block Chaining) mode, and stores the
decrypted data in String. Read moreSource§fn decrypt_array<U, const N: usize>(
&mut self,
iv: T,
cipher: &[U; N],
message: *mut u8,
) -> u64where
U: SmallUInt,
fn decrypt_array<U, const N: usize>(
&mut self,
iv: T,
cipher: &[U; N],
message: *mut u8,
) -> u64where
U: SmallUInt,
[U; N] object with the padding
defined according to PKCS #7 in CBC (Cipher-Block Chaining) mode. Read moreSource§fn decrypt_array_into_vec<U, V, const N: usize>(
&mut self,
iv: T,
cipher: &[U; N],
message: &mut Vec<V>,
) -> u64
fn decrypt_array_into_vec<U, V, const N: usize>( &mut self, iv: T, cipher: &[U; N], message: &mut Vec<V>, ) -> u64
[U; N] object with the padding
defined according to PKCS #7 in CBC (Cipher-Block Chaining) mode,
and stores the decrypted data in Vec<V>. Read moreSource§fn decrypt_array_into_array<U, V, const N: usize, const M: usize>(
&mut self,
iv: T,
cipher: &[U; N],
message: &mut [V; M],
) -> u64
fn decrypt_array_into_array<U, V, const N: usize, const M: usize>( &mut self, iv: T, cipher: &[U; N], message: &mut [V; M], ) -> u64
[U; N] object with the padding
defined according to PKCS #7 in CBC (Cipher-Block Chaining) mode,
and stores the decrypted data in array [V; M]. Read moreSource§fn decrypt_array_into_string<U, const N: usize>(
&mut self,
iv: T,
cipher: &[U; N],
message: &mut String,
) -> u64where
U: SmallUInt,
fn decrypt_array_into_string<U, const N: usize>(
&mut self,
iv: T,
cipher: &[U; N],
message: &mut String,
) -> u64where
U: SmallUInt,
[U; N] object with the padding
defined according to PKCS #7 in CBC (Cipher-Block Chaining) mode,
and stores the decrypted data in String. Read moreSource§impl<const ROUND: usize, const NB: usize, const NK: usize, const IRREDUCIBLE: u8, const AFFINE_MUL: u64, const AFFINE_ADD: u8, const SR0: usize, const SR1: usize, const SR2: usize, const SR3: usize, const MC00: u8, const MC01: u8, const MC02: u8, const MC03: u8, const MC10: u8, const MC11: u8, const MC12: u8, const MC13: u8, const MC20: u8, const MC21: u8, const MC22: u8, const MC23: u8, const MC30: u8, const MC31: u8, const MC32: u8, const MC33: u8, const RC0: u32, const RC1: u32, const RC2: u32, const RC3: u32, const RC4: u32, const RC5: u32, const RC6: u32, const RC7: u32, const RC8: u32, const RC9: u32, const ROT: u32> CFB<[u32; NB]> for Rijndael_Generic<ROUND, NB, NK, IRREDUCIBLE, AFFINE_MUL, AFFINE_ADD, SR0, SR1, SR2, SR3, MC00, MC01, MC02, MC03, MC10, MC11, MC12, MC13, MC20, MC21, MC22, MC23, MC30, MC31, MC32, MC33, RC0, RC1, RC2, RC3, RC4, RC5, RC6, RC7, RC8, RC9, ROT>
impl<const ROUND: usize, const NB: usize, const NK: usize, const IRREDUCIBLE: u8, const AFFINE_MUL: u64, const AFFINE_ADD: u8, const SR0: usize, const SR1: usize, const SR2: usize, const SR3: usize, const MC00: u8, const MC01: u8, const MC02: u8, const MC03: u8, const MC10: u8, const MC11: u8, const MC12: u8, const MC13: u8, const MC20: u8, const MC21: u8, const MC22: u8, const MC23: u8, const MC30: u8, const MC31: u8, const MC32: u8, const MC33: u8, const RC0: u32, const RC1: u32, const RC2: u32, const RC3: u32, const RC4: u32, const RC5: u32, const RC6: u32, const RC7: u32, const RC8: u32, const RC9: u32, const ROT: u32> CFB<[u32; NB]> for Rijndael_Generic<ROUND, NB, NK, IRREDUCIBLE, AFFINE_MUL, AFFINE_ADD, SR0, SR1, SR2, SR3, MC00, MC01, MC02, MC03, MC10, MC11, MC12, MC13, MC20, MC21, MC22, MC23, MC30, MC31, MC32, MC33, RC0, RC1, RC2, RC3, RC4, RC5, RC6, RC7, RC8, RC9, ROT>
Source§fn encrypt(
&mut self,
iv: [u32; NB],
message: *const u8,
length_in_bytes: u64,
cipher: *mut u8,
) -> u64
fn encrypt( &mut self, iv: [u32; NB], message: *const u8, length_in_bytes: u64, cipher: *mut u8, ) -> u64
Source§fn decrypt(
&mut self,
iv: [u32; NB],
cipher: *const u8,
length_in_bytes: u64,
message: *mut u8,
) -> u64
fn decrypt( &mut self, iv: [u32; NB], cipher: *const u8, length_in_bytes: u64, message: *mut u8, ) -> u64
Source§fn encrypt_into_array<U, const N: usize>(
&mut self,
iv: [u32; NB],
message: *const u8,
length_in_bytes: u64,
cipher: &mut [U; N],
) -> u64where
U: SmallUInt,
fn encrypt_into_array<U, const N: usize>(
&mut self,
iv: [u32; NB],
message: *const u8,
length_in_bytes: u64,
cipher: &mut [U; N],
) -> u64where
U: SmallUInt,
[U; N]. Read moreSource§fn encrypt_into_vec<U>(
&mut self,
iv: [u32; NB],
message: *const u8,
length_in_bytes: u64,
cipher: &mut Vec<U>,
) -> u64where
U: SmallUInt,
fn encrypt_into_vec<U>(
&mut self,
iv: [u32; NB],
message: *const u8,
length_in_bytes: u64,
cipher: &mut Vec<U>,
) -> u64where
U: SmallUInt,
Vec<U>. Read moreSource§fn decrypt_into_array<U, const N: usize>(
&mut self,
iv: [u32; NB],
cipher: *const u8,
length_in_bytes: u64,
message: &mut [U; N],
) -> u64where
U: SmallUInt,
fn decrypt_into_array<U, const N: usize>(
&mut self,
iv: [u32; NB],
cipher: *const u8,
length_in_bytes: u64,
message: &mut [U; N],
) -> u64where
U: SmallUInt,
[U; N]. Read moreSource§fn encrypt_str(&mut self, iv: T, message: &str, cipher: *mut u8) -> u64
fn encrypt_str(&mut self, iv: T, message: &str, cipher: *mut u8) -> u64
str object without any padding in CFB (Cipher
FeedBack) mode. Read moreSource§fn encrypt_str_into_vec<U>(
&mut self,
iv: T,
message: &str,
cipher: &mut Vec<U>,
) -> u64where
U: SmallUInt,
fn encrypt_str_into_vec<U>(
&mut self,
iv: T,
message: &str,
cipher: &mut Vec<U>,
) -> u64where
U: SmallUInt,
str without any padding in CFB (Cipher FeedBack)
mode, and stores the encrypted data in Vec<U>. Read moreSource§fn encrypt_str_into_array<U, const N: usize>(
&mut self,
iv: T,
message: &str,
cipher: &mut [U; N],
) -> u64where
U: SmallUInt,
fn encrypt_str_into_array<U, const N: usize>(
&mut self,
iv: T,
message: &str,
cipher: &mut [U; N],
) -> u64where
U: SmallUInt,
str object without any padding in CFB (Cipher
FeedBack) mode, and stores the encrypted data in array [U; N]. Read moreSource§fn encrypt_string(&mut self, iv: T, message: &String, cipher: *mut u8) -> u64
fn encrypt_string(&mut self, iv: T, message: &String, cipher: *mut u8) -> u64
String object without any padding
in CFB (Cipher FeedBack) mode. Read moreSource§fn encrypt_string_into_vec<U>(
&mut self,
iv: T,
message: &String,
cipher: &mut Vec<U>,
) -> u64where
U: SmallUInt,
fn encrypt_string_into_vec<U>(
&mut self,
iv: T,
message: &String,
cipher: &mut Vec<U>,
) -> u64where
U: SmallUInt,
String object without any padding in
CFB (Cipher FeedBack) mode, and stores the encrypted data in Vec<U>. Read moreSource§fn encrypt_string_into_array<U, const N: usize>(
&mut self,
iv: T,
message: &String,
cipher: &mut [U; N],
) -> u64where
U: SmallUInt,
fn encrypt_string_into_array<U, const N: usize>(
&mut self,
iv: T,
message: &String,
cipher: &mut [U; N],
) -> u64where
U: SmallUInt,
String object without any padding in CFB
(Cipher FeedBack) mode, and stores the encrypted data in array [U; N]. Read moreSource§fn encrypt_vec<U>(&mut self, iv: T, message: &Vec<U>, cipher: *mut u8) -> u64where
U: SmallUInt,
fn encrypt_vec<U>(&mut self, iv: T, message: &Vec<U>, cipher: *mut u8) -> u64where
U: SmallUInt,
Vec<U> object without any padding
in CFB (Cipher FeedBack) mode. Read moreSource§fn encrypt_vec_into_vec<U, V>(
&mut self,
iv: T,
message: &Vec<U>,
cipher: &mut Vec<V>,
) -> u64
fn encrypt_vec_into_vec<U, V>( &mut self, iv: T, message: &Vec<U>, cipher: &mut Vec<V>, ) -> u64
Vec<U> object without any padding in
CFB (Cipher FeedBack) mode, and stores the encrypted data in Vec<V>. Read moreSource§fn encrypt_vec_into_array<U, V, const N: usize>(
&mut self,
iv: T,
message: &Vec<U>,
cipher: &mut [V; N],
) -> u64
fn encrypt_vec_into_array<U, V, const N: usize>( &mut self, iv: T, message: &Vec<U>, cipher: &mut [V; N], ) -> u64
Vec<U> object without any padding in CFB
(Cipher FeedBack) mode, and stores the encrypted data in array [V; N]. Read moreSource§fn encrypt_array<U, const N: usize>(
&mut self,
iv: T,
message: &[U; N],
cipher: *mut u8,
) -> u64where
U: SmallUInt,
fn encrypt_array<U, const N: usize>(
&mut self,
iv: T,
message: &[U; N],
cipher: *mut u8,
) -> u64where
U: SmallUInt,
[U; N] object without any
padding in CFB (Cipher FeedBack) mode. Read moreSource§fn encrypt_array_into_vec<U, V, const N: usize>(
&mut self,
iv: T,
message: &[U; N],
cipher: &mut Vec<V>,
) -> u64
fn encrypt_array_into_vec<U, V, const N: usize>( &mut self, iv: T, message: &[U; N], cipher: &mut Vec<V>, ) -> u64
[U; N] object without any padding
in CFB (Cipher FeedBack) mode, and stores the encrypted data in Vec<V>. Read moreSource§fn encrypt_array_into_array<U, V, const N: usize, const M: usize>(
&mut self,
iv: T,
message: &[U; N],
cipher: &mut [V; M],
) -> u64
fn encrypt_array_into_array<U, V, const N: usize, const M: usize>( &mut self, iv: T, message: &[U; N], cipher: &mut [V; M], ) -> u64
[U; N] object without any padding
in CFB (Cipher FeedBack) mode, and stores the encrypted data
in array [V; M]. Read moreSource§fn decrypt_into_vec<U>(
&mut self,
iv: T,
cipher: *const u8,
length_in_bytes: u64,
message: &mut Vec<U>,
) -> u64where
U: SmallUInt,
fn decrypt_into_vec<U>(
&mut self,
iv: T,
cipher: *const u8,
length_in_bytes: u64,
message: &mut Vec<U>,
) -> u64where
U: SmallUInt,
Vec<U>. Read moreSource§fn decrypt_into_string(
&mut self,
iv: T,
cipher: *const u8,
length_in_bytes: u64,
message: &mut String,
) -> u64
fn decrypt_into_string( &mut self, iv: T, cipher: *const u8, length_in_bytes: u64, message: &mut String, ) -> u64
String. Read moreSource§fn decrypt_vec<U>(&mut self, iv: T, cipher: &Vec<U>, message: *mut u8) -> u64where
U: SmallUInt,
fn decrypt_vec<U>(&mut self, iv: T, cipher: &Vec<U>, message: *mut u8) -> u64where
U: SmallUInt,
Vec<U> object without any padding
in CFB (Cipher FeedBack) mode. Read moreSource§fn decrypt_vec_into_vec<U, V>(
&mut self,
iv: T,
cipher: &Vec<U>,
message: &mut Vec<V>,
) -> u64
fn decrypt_vec_into_vec<U, V>( &mut self, iv: T, cipher: &Vec<U>, message: &mut Vec<V>, ) -> u64
Vec<U> object without any padding in
CFB (Cipher FeedBack) mode, and stores the decrypted data in Vec<V>. Read moreSource§fn decrypt_vec_into_array<U, V, const N: usize>(
&mut self,
iv: T,
cipher: &Vec<U>,
message: &mut [V; N],
) -> u64
fn decrypt_vec_into_array<U, V, const N: usize>( &mut self, iv: T, cipher: &Vec<U>, message: &mut [V; N], ) -> u64
Vec<U> object without any padding in CFB
(Cipher FeedBack) mode, and stores the decrypted data in array [V; N]. Read moreSource§fn decrypt_vec_into_string<U>(
&mut self,
iv: T,
cipher: &Vec<U>,
message: &mut String,
) -> u64where
U: SmallUInt,
fn decrypt_vec_into_string<U>(
&mut self,
iv: T,
cipher: &Vec<U>,
message: &mut String,
) -> u64where
U: SmallUInt,
str without any padding in CFB (Cipher FeedBack)
mode, and stores the decrypted data in String. Read moreSource§fn decrypt_array<U, const N: usize>(
&mut self,
iv: T,
cipher: &[U; N],
message: *mut u8,
) -> u64where
U: SmallUInt,
fn decrypt_array<U, const N: usize>(
&mut self,
iv: T,
cipher: &[U; N],
message: *mut u8,
) -> u64where
U: SmallUInt,
[U; N] object without any padding
in CFB (Cipher FeedBack) mode. Read moreSource§fn decrypt_array_into_vec<U, V, const N: usize>(
&mut self,
iv: T,
cipher: &[U; N],
message: &mut Vec<V>,
) -> u64
fn decrypt_array_into_vec<U, V, const N: usize>( &mut self, iv: T, cipher: &[U; N], message: &mut Vec<V>, ) -> u64
[U; N] object without any padding
in CFB (Cipher FeedBack) mode, and stores the decrypted data in Vec<V>. Read moreSource§impl<const ROUND: usize, const NB: usize, const NK: usize, const IRREDUCIBLE: u8, const AFFINE_MUL: u64, const AFFINE_ADD: u8, const SR0: usize, const SR1: usize, const SR2: usize, const SR3: usize, const MC00: u8, const MC01: u8, const MC02: u8, const MC03: u8, const MC10: u8, const MC11: u8, const MC12: u8, const MC13: u8, const MC20: u8, const MC21: u8, const MC22: u8, const MC23: u8, const MC30: u8, const MC31: u8, const MC32: u8, const MC33: u8, const RC0: u32, const RC1: u32, const RC2: u32, const RC3: u32, const RC4: u32, const RC5: u32, const RC6: u32, const RC7: u32, const RC8: u32, const RC9: u32, const ROT: u32> CTR<[u32; NB]> for Rijndael_Generic<ROUND, NB, NK, IRREDUCIBLE, AFFINE_MUL, AFFINE_ADD, SR0, SR1, SR2, SR3, MC00, MC01, MC02, MC03, MC10, MC11, MC12, MC13, MC20, MC21, MC22, MC23, MC30, MC31, MC32, MC33, RC0, RC1, RC2, RC3, RC4, RC5, RC6, RC7, RC8, RC9, ROT>
impl<const ROUND: usize, const NB: usize, const NK: usize, const IRREDUCIBLE: u8, const AFFINE_MUL: u64, const AFFINE_ADD: u8, const SR0: usize, const SR1: usize, const SR2: usize, const SR3: usize, const MC00: u8, const MC01: u8, const MC02: u8, const MC03: u8, const MC10: u8, const MC11: u8, const MC12: u8, const MC13: u8, const MC20: u8, const MC21: u8, const MC22: u8, const MC23: u8, const MC30: u8, const MC31: u8, const MC32: u8, const MC33: u8, const RC0: u32, const RC1: u32, const RC2: u32, const RC3: u32, const RC4: u32, const RC5: u32, const RC6: u32, const RC7: u32, const RC8: u32, const RC9: u32, const ROT: u32> CTR<[u32; NB]> for Rijndael_Generic<ROUND, NB, NK, IRREDUCIBLE, AFFINE_MUL, AFFINE_ADD, SR0, SR1, SR2, SR3, MC00, MC01, MC02, MC03, MC10, MC11, MC12, MC13, MC20, MC21, MC22, MC23, MC30, MC31, MC32, MC33, RC0, RC1, RC2, RC3, RC4, RC5, RC6, RC7, RC8, RC9, ROT>
Source§fn encrypt(
&mut self,
nonce: [u32; NB],
message: *const u8,
length_in_bytes: u64,
cipher: *mut u8,
) -> u64
fn encrypt( &mut self, nonce: [u32; NB], message: *const u8, length_in_bytes: u64, cipher: *mut u8, ) -> u64
Source§fn encrypt_into_array<U, const N: usize>(
&mut self,
iv: [u32; NB],
message: *const u8,
length_in_bytes: u64,
cipher: &mut [U; N],
) -> u64where
U: SmallUInt,
fn encrypt_into_array<U, const N: usize>(
&mut self,
iv: [u32; NB],
message: *const u8,
length_in_bytes: u64,
cipher: &mut [U; N],
) -> u64where
U: SmallUInt,
[U; N]. Read moreSource§fn encrypt_into_vec<U>(
&mut self,
iv: [u32; NB],
message: *const u8,
length_in_bytes: u64,
cipher: &mut Vec<U>,
) -> u64where
U: SmallUInt,
fn encrypt_into_vec<U>(
&mut self,
iv: [u32; NB],
message: *const u8,
length_in_bytes: u64,
cipher: &mut Vec<U>,
) -> u64where
U: SmallUInt,
Vec<U>. Read moreSource§fn decrypt_into_array<U, const N: usize>(
&mut self,
iv: [u32; NB],
cipher: *const u8,
length_in_bytes: u64,
message: &mut [U; N],
) -> u64where
U: SmallUInt,
fn decrypt_into_array<U, const N: usize>(
&mut self,
iv: [u32; NB],
cipher: *const u8,
length_in_bytes: u64,
message: &mut [U; N],
) -> u64where
U: SmallUInt,
[U; N]. Read moreSource§fn encrypt_str(&mut self, nonce: T, message: &str, cipher: *mut u8) -> u64
fn encrypt_str(&mut self, nonce: T, message: &str, cipher: *mut u8) -> u64
str object without any padding in CTR (CounTeR) mode. Read moreSource§fn encrypt_str_into_vec<U>(
&mut self,
nonce: T,
message: &str,
cipher: &mut Vec<U>,
) -> u64where
U: SmallUInt,
fn encrypt_str_into_vec<U>(
&mut self,
nonce: T,
message: &str,
cipher: &mut Vec<U>,
) -> u64where
U: SmallUInt,
str without any padding in CTR (CounTeR)
mode, and stores the encrypted data in Vec<U>. Read moreSource§fn encrypt_str_into_array<U, const N: usize>(
&mut self,
nonce: T,
message: &str,
cipher: &mut [U; N],
) -> u64where
U: SmallUInt,
fn encrypt_str_into_array<U, const N: usize>(
&mut self,
nonce: T,
message: &str,
cipher: &mut [U; N],
) -> u64where
U: SmallUInt,
str object without any padding in CTR (CounTeR) mode, and stores the encrypted data in array [U; N]. Read moreSource§fn encrypt_string(&mut self, nonce: T, message: &String, cipher: *mut u8) -> u64
fn encrypt_string(&mut self, nonce: T, message: &String, cipher: *mut u8) -> u64
String object without any padding
in CTR (CounTeR) mode. Read moreSource§fn encrypt_string_into_vec<U>(
&mut self,
nonce: T,
message: &String,
cipher: &mut Vec<U>,
) -> u64where
U: SmallUInt,
fn encrypt_string_into_vec<U>(
&mut self,
nonce: T,
message: &String,
cipher: &mut Vec<U>,
) -> u64where
U: SmallUInt,
String object without any padding in
CTR (CounTeR) mode, and stores the encrypted data in Vec<U>. Read moreSource§fn encrypt_string_into_array<U, const N: usize>(
&mut self,
nonce: T,
message: &String,
cipher: &mut [U; N],
) -> u64where
U: SmallUInt,
fn encrypt_string_into_array<U, const N: usize>(
&mut self,
nonce: T,
message: &String,
cipher: &mut [U; N],
) -> u64where
U: SmallUInt,
String object without any padding in CTR
(CounTeR) mode, and stores the encrypted data in array [U; N]. Read moreSource§fn encrypt_vec<U>(&mut self, nonce: T, message: &Vec<U>, cipher: *mut u8) -> u64where
U: SmallUInt,
fn encrypt_vec<U>(&mut self, nonce: T, message: &Vec<U>, cipher: *mut u8) -> u64where
U: SmallUInt,
Vec<U> object without any padding
in CTR (CounTeR) mode. Read moreSource§fn encrypt_vec_into_vec<U, V>(
&mut self,
nonce: T,
message: &Vec<U>,
cipher: &mut Vec<V>,
) -> u64
fn encrypt_vec_into_vec<U, V>( &mut self, nonce: T, message: &Vec<U>, cipher: &mut Vec<V>, ) -> u64
Vec<U> object without any padding in
CTR (CounTeR) mode, and stores the encrypted data in Vec<V>. Read moreSource§fn encrypt_vec_into_array<U, V, const N: usize>(
&mut self,
nonce: T,
message: &Vec<U>,
cipher: &mut [V; N],
) -> u64
fn encrypt_vec_into_array<U, V, const N: usize>( &mut self, nonce: T, message: &Vec<U>, cipher: &mut [V; N], ) -> u64
Vec<U> object without any padding in CTR
(CounTeR) mode, and stores the encrypted data in array [V; N]. Read moreSource§fn encrypt_array<U, const N: usize>(
&mut self,
nonce: T,
message: &[U; N],
cipher: *mut u8,
) -> u64where
U: SmallUInt,
fn encrypt_array<U, const N: usize>(
&mut self,
nonce: T,
message: &[U; N],
cipher: *mut u8,
) -> u64where
U: SmallUInt,
[U; N] object without any
padding in CTR (CounTeR) mode. Read moreSource§fn encrypt_array_into_vec<U, V, const N: usize>(
&mut self,
nonce: T,
message: &[U; N],
cipher: &mut Vec<V>,
) -> u64
fn encrypt_array_into_vec<U, V, const N: usize>( &mut self, nonce: T, message: &[U; N], cipher: &mut Vec<V>, ) -> u64
[U; N] object without any padding
in CTR (CounTeR) mode, and stores the encrypted data in Vec<V>. Read moreSource§fn encrypt_array_into_array<U, V, const N: usize, const M: usize>(
&mut self,
nonce: T,
message: &[U; N],
cipher: &mut [V; M],
) -> u64
fn encrypt_array_into_array<U, V, const N: usize, const M: usize>( &mut self, nonce: T, message: &[U; N], cipher: &mut [V; M], ) -> u64
[U; N] object without any padding
in CTR (CounTeR) mode, and stores the encrypted data
in array [V; M]. Read moreSource§fn decrypt(
&mut self,
nonce: T,
cipher: *const u8,
length_in_bytes: u64,
message: *mut u8,
) -> u64
fn decrypt( &mut self, nonce: T, cipher: *const u8, length_in_bytes: u64, message: *mut u8, ) -> u64
Source§fn decrypt_into_vec<U>(
&mut self,
nonce: T,
cipher: *const u8,
length_in_bytes: u64,
message: &mut Vec<U>,
) -> u64where
U: SmallUInt,
fn decrypt_into_vec<U>(
&mut self,
nonce: T,
cipher: *const u8,
length_in_bytes: u64,
message: &mut Vec<U>,
) -> u64where
U: SmallUInt,
Vec<U>. Read moreSource§fn decrypt_into_string(
&mut self,
nonce: T,
cipher: *const u8,
length_in_bytes: u64,
message: &mut String,
) -> u64
fn decrypt_into_string( &mut self, nonce: T, cipher: *const u8, length_in_bytes: u64, message: &mut String, ) -> u64
String. Read moreSource§fn decrypt_vec<U>(&mut self, nonce: T, cipher: &Vec<U>, message: *mut u8) -> u64where
U: SmallUInt,
fn decrypt_vec<U>(&mut self, nonce: T, cipher: &Vec<U>, message: *mut u8) -> u64where
U: SmallUInt,
Vec<U> object without any padding
in CTR (CounTeR) mode. Read moreSource§fn decrypt_vec_into_vec<U, V>(
&mut self,
nonce: T,
cipher: &Vec<U>,
message: &mut Vec<V>,
) -> u64
fn decrypt_vec_into_vec<U, V>( &mut self, nonce: T, cipher: &Vec<U>, message: &mut Vec<V>, ) -> u64
Vec<U> object without any padding in
CTR (CounTeR) mode, and stores the decrypted data in Vec<V>. Read moreSource§fn decrypt_vec_into_array<U, V, const N: usize>(
&mut self,
nonce: T,
cipher: &Vec<U>,
message: &mut [V; N],
) -> u64
fn decrypt_vec_into_array<U, V, const N: usize>( &mut self, nonce: T, cipher: &Vec<U>, message: &mut [V; N], ) -> u64
Vec<U> object without any padding in CTR
(CounTeR) mode, and stores the decrypted data in array [V; N]. Read moreSource§fn decrypt_vec_into_string<U>(
&mut self,
nonce: T,
cipher: &Vec<U>,
message: &mut String,
) -> u64where
U: SmallUInt,
fn decrypt_vec_into_string<U>(
&mut self,
nonce: T,
cipher: &Vec<U>,
message: &mut String,
) -> u64where
U: SmallUInt,
str without any padding in CTR (CounTeR)
mode, and stores the decrypted data in String. Read moreSource§fn decrypt_array<U, const N: usize>(
&mut self,
nonce: T,
cipher: &[U; N],
message: *mut u8,
) -> u64where
U: SmallUInt,
fn decrypt_array<U, const N: usize>(
&mut self,
nonce: T,
cipher: &[U; N],
message: *mut u8,
) -> u64where
U: SmallUInt,
[U; N] object without any padding
in CTR (CounTeR) mode. Read moreSource§fn decrypt_array_into_vec<U, V, const N: usize>(
&mut self,
nonce: T,
cipher: &[U; N],
message: &mut Vec<V>,
) -> u64
fn decrypt_array_into_vec<U, V, const N: usize>( &mut self, nonce: T, cipher: &[U; N], message: &mut Vec<V>, ) -> u64
[U; N] object without any padding
in CTR (CounTeR) mode, and stores the decrypted data in Vec<V>. Read moreSource§impl<const ROUND: usize, const NB: usize, const NK: usize, const IRREDUCIBLE: u8, const AFFINE_MUL: u64, const AFFINE_ADD: u8, const SR0: usize, const SR1: usize, const SR2: usize, const SR3: usize, const MC00: u8, const MC01: u8, const MC02: u8, const MC03: u8, const MC10: u8, const MC11: u8, const MC12: u8, const MC13: u8, const MC20: u8, const MC21: u8, const MC22: u8, const MC23: u8, const MC30: u8, const MC31: u8, const MC32: u8, const MC33: u8, const RC0: u32, const RC1: u32, const RC2: u32, const RC3: u32, const RC4: u32, const RC5: u32, const RC6: u32, const RC7: u32, const RC8: u32, const RC9: u32, const ROT: u32> Clone for Rijndael_Generic<ROUND, NB, NK, IRREDUCIBLE, AFFINE_MUL, AFFINE_ADD, SR0, SR1, SR2, SR3, MC00, MC01, MC02, MC03, MC10, MC11, MC12, MC13, MC20, MC21, MC22, MC23, MC30, MC31, MC32, MC33, RC0, RC1, RC2, RC3, RC4, RC5, RC6, RC7, RC8, RC9, ROT>
impl<const ROUND: usize, const NB: usize, const NK: usize, const IRREDUCIBLE: u8, const AFFINE_MUL: u64, const AFFINE_ADD: u8, const SR0: usize, const SR1: usize, const SR2: usize, const SR3: usize, const MC00: u8, const MC01: u8, const MC02: u8, const MC03: u8, const MC10: u8, const MC11: u8, const MC12: u8, const MC13: u8, const MC20: u8, const MC21: u8, const MC22: u8, const MC23: u8, const MC30: u8, const MC31: u8, const MC32: u8, const MC33: u8, const RC0: u32, const RC1: u32, const RC2: u32, const RC3: u32, const RC4: u32, const RC5: u32, const RC6: u32, const RC7: u32, const RC8: u32, const RC9: u32, const ROT: u32> Clone for Rijndael_Generic<ROUND, NB, NK, IRREDUCIBLE, AFFINE_MUL, AFFINE_ADD, SR0, SR1, SR2, SR3, MC00, MC01, MC02, MC03, MC10, MC11, MC12, MC13, MC20, MC21, MC22, MC23, MC30, MC31, MC32, MC33, RC0, RC1, RC2, RC3, RC4, RC5, RC6, RC7, RC8, RC9, ROT>
Source§fn clone(
&self,
) -> Rijndael_Generic<ROUND, NB, NK, IRREDUCIBLE, AFFINE_MUL, AFFINE_ADD, SR0, SR1, SR2, SR3, MC00, MC01, MC02, MC03, MC10, MC11, MC12, MC13, MC20, MC21, MC22, MC23, MC30, MC31, MC32, MC33, RC0, RC1, RC2, RC3, RC4, RC5, RC6, RC7, RC8, RC9, ROT>
fn clone( &self, ) -> Rijndael_Generic<ROUND, NB, NK, IRREDUCIBLE, AFFINE_MUL, AFFINE_ADD, SR0, SR1, SR2, SR3, MC00, MC01, MC02, MC03, MC10, MC11, MC12, MC13, MC20, MC21, MC22, MC23, MC30, MC31, MC32, MC33, RC0, RC1, RC2, RC3, RC4, RC5, RC6, RC7, RC8, RC9, ROT>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<const ROUND: usize, const NB: usize, const NK: usize, const IRREDUCIBLE: u8, const AFFINE_MUL: u64, const AFFINE_ADD: u8, const SR0: usize, const SR1: usize, const SR2: usize, const SR3: usize, const MC00: u8, const MC01: u8, const MC02: u8, const MC03: u8, const MC10: u8, const MC11: u8, const MC12: u8, const MC13: u8, const MC20: u8, const MC21: u8, const MC22: u8, const MC23: u8, const MC30: u8, const MC31: u8, const MC32: u8, const MC33: u8, const RC0: u32, const RC1: u32, const RC2: u32, const RC3: u32, const RC4: u32, const RC5: u32, const RC6: u32, const RC7: u32, const RC8: u32, const RC9: u32, const ROT: u32> Debug for Rijndael_Generic<ROUND, NB, NK, IRREDUCIBLE, AFFINE_MUL, AFFINE_ADD, SR0, SR1, SR2, SR3, MC00, MC01, MC02, MC03, MC10, MC11, MC12, MC13, MC20, MC21, MC22, MC23, MC30, MC31, MC32, MC33, RC0, RC1, RC2, RC3, RC4, RC5, RC6, RC7, RC8, RC9, ROT>
impl<const ROUND: usize, const NB: usize, const NK: usize, const IRREDUCIBLE: u8, const AFFINE_MUL: u64, const AFFINE_ADD: u8, const SR0: usize, const SR1: usize, const SR2: usize, const SR3: usize, const MC00: u8, const MC01: u8, const MC02: u8, const MC03: u8, const MC10: u8, const MC11: u8, const MC12: u8, const MC13: u8, const MC20: u8, const MC21: u8, const MC22: u8, const MC23: u8, const MC30: u8, const MC31: u8, const MC32: u8, const MC33: u8, const RC0: u32, const RC1: u32, const RC2: u32, const RC3: u32, const RC4: u32, const RC5: u32, const RC6: u32, const RC7: u32, const RC8: u32, const RC9: u32, const ROT: u32> Debug for Rijndael_Generic<ROUND, NB, NK, IRREDUCIBLE, AFFINE_MUL, AFFINE_ADD, SR0, SR1, SR2, SR3, MC00, MC01, MC02, MC03, MC10, MC11, MC12, MC13, MC20, MC21, MC22, MC23, MC30, MC31, MC32, MC33, RC0, RC1, RC2, RC3, RC4, RC5, RC6, RC7, RC8, RC9, ROT>
Source§impl<const ROUND: usize, const NB: usize, const NK: usize, const IRREDUCIBLE: u8, const AFFINE_MUL: u64, const AFFINE_ADD: u8, const SR0: usize, const SR1: usize, const SR2: usize, const SR3: usize, const MC00: u8, const MC01: u8, const MC02: u8, const MC03: u8, const MC10: u8, const MC11: u8, const MC12: u8, const MC13: u8, const MC20: u8, const MC21: u8, const MC22: u8, const MC23: u8, const MC30: u8, const MC31: u8, const MC32: u8, const MC33: u8, const RC0: u32, const RC1: u32, const RC2: u32, const RC3: u32, const RC4: u32, const RC5: u32, const RC6: u32, const RC7: u32, const RC8: u32, const RC9: u32, const ROT: u32> ECB_ISO<[u32; NB]> for Rijndael_Generic<ROUND, NB, NK, IRREDUCIBLE, AFFINE_MUL, AFFINE_ADD, SR0, SR1, SR2, SR3, MC00, MC01, MC02, MC03, MC10, MC11, MC12, MC13, MC20, MC21, MC22, MC23, MC30, MC31, MC32, MC33, RC0, RC1, RC2, RC3, RC4, RC5, RC6, RC7, RC8, RC9, ROT>
impl<const ROUND: usize, const NB: usize, const NK: usize, const IRREDUCIBLE: u8, const AFFINE_MUL: u64, const AFFINE_ADD: u8, const SR0: usize, const SR1: usize, const SR2: usize, const SR3: usize, const MC00: u8, const MC01: u8, const MC02: u8, const MC03: u8, const MC10: u8, const MC11: u8, const MC12: u8, const MC13: u8, const MC20: u8, const MC21: u8, const MC22: u8, const MC23: u8, const MC30: u8, const MC31: u8, const MC32: u8, const MC33: u8, const RC0: u32, const RC1: u32, const RC2: u32, const RC3: u32, const RC4: u32, const RC5: u32, const RC6: u32, const RC7: u32, const RC8: u32, const RC9: u32, const ROT: u32> ECB_ISO<[u32; NB]> for Rijndael_Generic<ROUND, NB, NK, IRREDUCIBLE, AFFINE_MUL, AFFINE_ADD, SR0, SR1, SR2, SR3, MC00, MC01, MC02, MC03, MC10, MC11, MC12, MC13, MC20, MC21, MC22, MC23, MC30, MC31, MC32, MC33, RC0, RC1, RC2, RC3, RC4, RC5, RC6, RC7, RC8, RC9, ROT>
Source§fn encrypt(
&mut self,
message: *const u8,
length_in_bytes: u64,
cipher: *mut u8,
) -> u64
fn encrypt( &mut self, message: *const u8, length_in_bytes: u64, cipher: *mut u8, ) -> u64
Source§fn decrypt(
&mut self,
cipher: *const u8,
length_in_bytes: u64,
message: *mut u8,
) -> u64
fn decrypt( &mut self, cipher: *const u8, length_in_bytes: u64, message: *mut u8, ) -> u64
Source§fn encrypt_into_array<U, const N: usize>(
&mut self,
message: *const u8,
length_in_bytes: u64,
cipher: &mut [U; N],
) -> u64where
U: SmallUInt,
fn encrypt_into_array<U, const N: usize>(
&mut self,
message: *const u8,
length_in_bytes: u64,
cipher: &mut [U; N],
) -> u64where
U: SmallUInt,
[U; N]. Read moreSource§fn encrypt_into_vec<U>(
&mut self,
message: *const u8,
length_in_bytes: u64,
cipher: &mut Vec<U>,
) -> u64where
U: SmallUInt,
fn encrypt_into_vec<U>(
&mut self,
message: *const u8,
length_in_bytes: u64,
cipher: &mut Vec<U>,
) -> u64where
U: SmallUInt,
Vec<U>. Read moreSource§fn decrypt_into_array<U, const N: usize>(
&mut self,
cipher: *const u8,
length_in_bytes: u64,
message: &mut [U; N],
) -> u64where
U: SmallUInt,
fn decrypt_into_array<U, const N: usize>(
&mut self,
cipher: *const u8,
length_in_bytes: u64,
message: &mut [U; N],
) -> u64where
U: SmallUInt,
[U; N]. Read moreSource§fn encrypt_str(&mut self, message: &str, cipher: *mut u8) -> u64
fn encrypt_str(&mut self, message: &str, cipher: *mut u8) -> u64
str object with the padding defined
according to ISO 7816-4 in ECB (Electronic CodeBook) mode. Read moreSource§fn encrypt_str_into_vec<U>(&mut self, message: &str, cipher: &mut Vec<U>) -> u64where
U: SmallUInt,
fn encrypt_str_into_vec<U>(&mut self, message: &str, cipher: &mut Vec<U>) -> u64where
U: SmallUInt,
str with the padding defined according to
ISO 7816-4 in ECB (Electronic CodeBook) mode, and stores the
encrypted data in Vec<U>. Read moreSource§fn encrypt_str_into_array<U, const N: usize>(
&mut self,
message: &str,
cipher: &mut [U; N],
) -> u64where
U: SmallUInt,
fn encrypt_str_into_array<U, const N: usize>(
&mut self,
message: &str,
cipher: &mut [U; N],
) -> u64where
U: SmallUInt,
str object with the padding defined
according to ISO 7816-4 in ECB (Electronic CodeBook) mode,
and stores the encrypted data in array [U; N]. Read moreSource§fn encrypt_string(&mut self, message: &String, cipher: *mut u8) -> u64
fn encrypt_string(&mut self, message: &String, cipher: *mut u8) -> u64
String object with the padding
according to ISO 7816-4 in ECB (Electronic CodeBook) mode. Read moreSource§fn encrypt_string_into_vec<U>(
&mut self,
message: &String,
cipher: &mut Vec<U>,
) -> u64where
U: SmallUInt,
fn encrypt_string_into_vec<U>(
&mut self,
message: &String,
cipher: &mut Vec<U>,
) -> u64where
U: SmallUInt,
String object with the padding
according to ISO 7816-4 in ECB (Electronic CodeBook) mode,
and stores the encrypted data in Vec<U>. Read moreSource§fn encrypt_string_into_array<U, const N: usize>(
&mut self,
message: &String,
cipher: &mut [U; N],
) -> u64where
U: SmallUInt,
fn encrypt_string_into_array<U, const N: usize>(
&mut self,
message: &String,
cipher: &mut [U; N],
) -> u64where
U: SmallUInt,
String object with the padding
according to ISO 7816-4 in ECB (Electronic CodeBook) mode,
and stores the encrypted data in array [U; N]. Read moreSource§fn encrypt_vec<U>(&mut self, message: &Vec<U>, cipher: *mut u8) -> u64where
U: SmallUInt,
fn encrypt_vec<U>(&mut self, message: &Vec<U>, cipher: *mut u8) -> u64where
U: SmallUInt,
Vec<U> object with the padding defined
according to ISO 7816-4 in ECB (Electronic CodeBook) mode. Read moreSource§fn encrypt_vec_into_vec<U, V>(
&mut self,
message: &Vec<U>,
cipher: &mut Vec<V>,
) -> u64
fn encrypt_vec_into_vec<U, V>( &mut self, message: &Vec<U>, cipher: &mut Vec<V>, ) -> u64
Vec<U> object with the padding defined
according to ISO 7816-4 in ECB (Electronic CodeBook) mode, and
stores the encrypted data in Vec<V>. Read moreSource§fn encrypt_vec_into_array<U, V, const N: usize>(
&mut self,
message: &Vec<U>,
cipher: &mut [V; N],
) -> u64
fn encrypt_vec_into_array<U, V, const N: usize>( &mut self, message: &Vec<U>, cipher: &mut [V; N], ) -> u64
Vec<U> object with the padding defined
according to ISO 7816-4 in ECB (Electronic CodeBook) mode, and
stores the encrypted data in array [V; N]. Read moreSource§fn encrypt_array<U, const N: usize>(
&mut self,
message: &[U; N],
cipher: *mut u8,
) -> u64where
U: SmallUInt,
fn encrypt_array<U, const N: usize>(
&mut self,
message: &[U; N],
cipher: *mut u8,
) -> u64where
U: SmallUInt,
[U; N] object with the padding
defined according to ISO 7816-4 in ECB (Electronic CodeBook) mode. Read moreSource§fn encrypt_array_into_vec<U, V, const N: usize>(
&mut self,
message: &[U; N],
cipher: &mut Vec<V>,
) -> u64
fn encrypt_array_into_vec<U, V, const N: usize>( &mut self, message: &[U; N], cipher: &mut Vec<V>, ) -> u64
[U; N] object with the padding
according to ISO 7816-4 in ECB (Electronic CodeBook) mode, and stores the
encrypted data in Vec<V>. Read moreSource§fn encrypt_array_into_array<U, V, const N: usize, const M: usize>(
&mut self,
message: &[U; N],
cipher: &mut [V; M],
) -> u64
fn encrypt_array_into_array<U, V, const N: usize, const M: usize>( &mut self, message: &[U; N], cipher: &mut [V; M], ) -> u64
[U; N] object with the padding
according to ISO 7816-4 in ECB (Electronic CodeBook) mode, and stores the
encrypted data in array [V; M]. Read moreSource§fn decrypt_into_vec<U>(
&mut self,
cipher: *const u8,
length_in_bytes: u64,
message: &mut Vec<U>,
) -> u64where
U: SmallUInt,
fn decrypt_into_vec<U>(
&mut self,
cipher: *const u8,
length_in_bytes: u64,
message: &mut Vec<U>,
) -> u64where
U: SmallUInt,
Vec<U>. Read moreSource§fn decrypt_into_string(
&mut self,
cipher: *const u8,
length_in_bytes: u64,
message: &mut String,
) -> u64
fn decrypt_into_string( &mut self, cipher: *const u8, length_in_bytes: u64, message: &mut String, ) -> u64
String. Read moreSource§fn decrypt_vec<U>(&mut self, cipher: &Vec<U>, message: *mut u8) -> u64where
U: SmallUInt,
fn decrypt_vec<U>(&mut self, cipher: &Vec<U>, message: *mut u8) -> u64where
U: SmallUInt,
Vec<U> object with the padding defined
according to ISO 7816-4 in ECB (Electronic CodeBook) mode. Read moreSource§fn decrypt_vec_into_vec<U, V>(
&mut self,
cipher: &Vec<U>,
message: &mut Vec<V>,
) -> u64
fn decrypt_vec_into_vec<U, V>( &mut self, cipher: &Vec<U>, message: &mut Vec<V>, ) -> u64
Vec<U> object with the padding defined
according to ISO 7816-4 in ECB (Electronic CodeBook) mode, and
stores the decrypted data in Vec<V>. Read moreSource§fn decrypt_vec_into_array<U, V, const N: usize>(
&mut self,
cipher: &Vec<U>,
message: &mut [V; N],
) -> u64
fn decrypt_vec_into_array<U, V, const N: usize>( &mut self, cipher: &Vec<U>, message: &mut [V; N], ) -> u64
Vec<U> object with the padding defined
according to ISO 7816-4 in ECB (Electronic CodeBook) mode, and
stores the decrypted data in array [V; N]. Read moreSource§fn decrypt_vec_into_string<U>(
&mut self,
cipher: &Vec<U>,
message: &mut String,
) -> u64where
U: SmallUInt,
fn decrypt_vec_into_string<U>(
&mut self,
cipher: &Vec<U>,
message: &mut String,
) -> u64where
U: SmallUInt,
str with the padding defined according to
ISO 7816-4 in ECB (Electronic CodeBook) mode, and stores the
decrypted data in String. Read moreSource§fn decrypt_array<U, const N: usize>(
&mut self,
cipher: &[U; N],
message: *mut u8,
) -> u64where
U: SmallUInt,
fn decrypt_array<U, const N: usize>(
&mut self,
cipher: &[U; N],
message: *mut u8,
) -> u64where
U: SmallUInt,
[U; N] object with the padding
defined according to ISO 7816-4 in ECB (Electronic CodeBook) mode. Read moreSource§fn decrypt_array_into_vec<U, V, const N: usize>(
&mut self,
cipher: &[U; N],
message: &mut Vec<V>,
) -> u64
fn decrypt_array_into_vec<U, V, const N: usize>( &mut self, cipher: &[U; N], message: &mut Vec<V>, ) -> u64
[U; N] object with the padding
defined according to ISO 7816-4 in ECB (Electronic CodeBook) mode,
and stores the decrypted data in Vec<V>. Read moreSource§fn decrypt_array_into_array<U, V, const N: usize, const M: usize>(
&mut self,
cipher: &[U; N],
message: &mut [V; M],
) -> u64
fn decrypt_array_into_array<U, V, const N: usize, const M: usize>( &mut self, cipher: &[U; N], message: &mut [V; M], ) -> u64
[U; N] object with the padding
defined according to ISO 7816-4 in ECB (Electronic CodeBook) mode,
and stores the decrypted data in array [V; M]. Read moreSource§fn decrypt_array_into_string<U, const N: usize>(
&mut self,
cipher: &[U; N],
message: &mut String,
) -> u64where
U: SmallUInt,
fn decrypt_array_into_string<U, const N: usize>(
&mut self,
cipher: &[U; N],
message: &mut String,
) -> u64where
U: SmallUInt,
[U; N] object with the padding
defined according to ISO 7816-4 in ECB (Electronic CodeBook) mode,
and stores the decrypted data in String. Read moreSource§impl<const ROUND: usize, const NB: usize, const NK: usize, const IRREDUCIBLE: u8, const AFFINE_MUL: u64, const AFFINE_ADD: u8, const SR0: usize, const SR1: usize, const SR2: usize, const SR3: usize, const MC00: u8, const MC01: u8, const MC02: u8, const MC03: u8, const MC10: u8, const MC11: u8, const MC12: u8, const MC13: u8, const MC20: u8, const MC21: u8, const MC22: u8, const MC23: u8, const MC30: u8, const MC31: u8, const MC32: u8, const MC33: u8, const RC0: u32, const RC1: u32, const RC2: u32, const RC3: u32, const RC4: u32, const RC5: u32, const RC6: u32, const RC7: u32, const RC8: u32, const RC9: u32, const ROT: u32> ECB_PKCS7<[u32; NB]> for Rijndael_Generic<ROUND, NB, NK, IRREDUCIBLE, AFFINE_MUL, AFFINE_ADD, SR0, SR1, SR2, SR3, MC00, MC01, MC02, MC03, MC10, MC11, MC12, MC13, MC20, MC21, MC22, MC23, MC30, MC31, MC32, MC33, RC0, RC1, RC2, RC3, RC4, RC5, RC6, RC7, RC8, RC9, ROT>
impl<const ROUND: usize, const NB: usize, const NK: usize, const IRREDUCIBLE: u8, const AFFINE_MUL: u64, const AFFINE_ADD: u8, const SR0: usize, const SR1: usize, const SR2: usize, const SR3: usize, const MC00: u8, const MC01: u8, const MC02: u8, const MC03: u8, const MC10: u8, const MC11: u8, const MC12: u8, const MC13: u8, const MC20: u8, const MC21: u8, const MC22: u8, const MC23: u8, const MC30: u8, const MC31: u8, const MC32: u8, const MC33: u8, const RC0: u32, const RC1: u32, const RC2: u32, const RC3: u32, const RC4: u32, const RC5: u32, const RC6: u32, const RC7: u32, const RC8: u32, const RC9: u32, const ROT: u32> ECB_PKCS7<[u32; NB]> for Rijndael_Generic<ROUND, NB, NK, IRREDUCIBLE, AFFINE_MUL, AFFINE_ADD, SR0, SR1, SR2, SR3, MC00, MC01, MC02, MC03, MC10, MC11, MC12, MC13, MC20, MC21, MC22, MC23, MC30, MC31, MC32, MC33, RC0, RC1, RC2, RC3, RC4, RC5, RC6, RC7, RC8, RC9, ROT>
Source§fn encrypt(
&mut self,
message: *const u8,
length_in_bytes: u64,
cipher: *mut u8,
) -> u64
fn encrypt( &mut self, message: *const u8, length_in_bytes: u64, cipher: *mut u8, ) -> u64
Source§fn decrypt(
&mut self,
cipher: *const u8,
length_in_bytes: u64,
message: *mut u8,
) -> u64
fn decrypt( &mut self, cipher: *const u8, length_in_bytes: u64, message: *mut u8, ) -> u64
Source§fn encrypt_into_array<U, const N: usize>(
&mut self,
message: *const u8,
length_in_bytes: u64,
cipher: &mut [U; N],
) -> u64where
U: SmallUInt,
fn encrypt_into_array<U, const N: usize>(
&mut self,
message: *const u8,
length_in_bytes: u64,
cipher: &mut [U; N],
) -> u64where
U: SmallUInt,
[U; N]. Read moreSource§fn encrypt_into_vec<U>(
&mut self,
message: *const u8,
length_in_bytes: u64,
cipher: &mut Vec<U>,
) -> u64where
U: SmallUInt,
fn encrypt_into_vec<U>(
&mut self,
message: *const u8,
length_in_bytes: u64,
cipher: &mut Vec<U>,
) -> u64where
U: SmallUInt,
Vec<U>. Read moreSource§fn decrypt_into_array<U, const N: usize>(
&mut self,
cipher: *const u8,
length_in_bytes: u64,
message: &mut [U; N],
) -> u64where
U: SmallUInt,
fn decrypt_into_array<U, const N: usize>(
&mut self,
cipher: *const u8,
length_in_bytes: u64,
message: &mut [U; N],
) -> u64where
U: SmallUInt,
[U; N]. Read moreSource§fn encrypt_str(&mut self, message: &str, cipher: *mut u8) -> u64
fn encrypt_str(&mut self, message: &str, cipher: *mut u8) -> u64
str object with the padding defined
according to PKCS #7 in ECB (Electronic CodeBook) mode. Read moreSource§fn encrypt_str_into_vec<U>(&mut self, message: &str, cipher: &mut Vec<U>) -> u64where
U: SmallUInt,
fn encrypt_str_into_vec<U>(&mut self, message: &str, cipher: &mut Vec<U>) -> u64where
U: SmallUInt,
str with the padding defined according to
PKCS #7 in ECB (Electronic CodeBook) mode, and stores the
encrypted data in Vec<U>. Read moreSource§fn encrypt_str_into_array<U, const N: usize>(
&mut self,
message: &str,
cipher: &mut [U; N],
) -> u64where
U: SmallUInt,
fn encrypt_str_into_array<U, const N: usize>(
&mut self,
message: &str,
cipher: &mut [U; N],
) -> u64where
U: SmallUInt,
str object with the padding defined
according to PKCS #7 in ECB (Electronic CodeBook) mode,
and stores the encrypted data in array [U; N]. Read moreSource§fn encrypt_string(&mut self, message: &String, cipher: *mut u8) -> u64
fn encrypt_string(&mut self, message: &String, cipher: *mut u8) -> u64
String object with the padding
according to PKCS #7 in ECB (Electronic CodeBook) mode. Read moreSource§fn encrypt_string_into_vec<U>(
&mut self,
message: &String,
cipher: &mut Vec<U>,
) -> u64where
U: SmallUInt,
fn encrypt_string_into_vec<U>(
&mut self,
message: &String,
cipher: &mut Vec<U>,
) -> u64where
U: SmallUInt,
String object with the padding
according to PKCS #7 in ECB (Electronic CodeBook) mode,
and stores the encrypted data in Vec<U>. Read moreSource§fn encrypt_string_into_array<U, const N: usize>(
&mut self,
message: &String,
cipher: &mut [U; N],
) -> u64where
U: SmallUInt,
fn encrypt_string_into_array<U, const N: usize>(
&mut self,
message: &String,
cipher: &mut [U; N],
) -> u64where
U: SmallUInt,
String object with the padding
according to PKCS #7 in ECB (Electronic CodeBook) mode,
and stores the encrypted data in array [U; N]. Read moreSource§fn encrypt_vec<U>(&mut self, message: &Vec<U>, cipher: *mut u8) -> u64where
U: SmallUInt,
fn encrypt_vec<U>(&mut self, message: &Vec<U>, cipher: *mut u8) -> u64where
U: SmallUInt,
Vec<U> object with the padding defined
according to PKCS #7 in ECB (Electronic CodeBook) mode. Read moreSource§fn encrypt_vec_into_vec<U, V>(
&mut self,
message: &Vec<U>,
cipher: &mut Vec<V>,
) -> u64
fn encrypt_vec_into_vec<U, V>( &mut self, message: &Vec<U>, cipher: &mut Vec<V>, ) -> u64
Vec<U> object with the padding defined
according to PKCS #7 in ECB (Electronic CodeBook) mode, and
stores the encrypted data in Vec<V>. Read moreSource§fn encrypt_vec_into_array<U, V, const N: usize>(
&mut self,
message: &Vec<U>,
cipher: &mut [V; N],
) -> u64
fn encrypt_vec_into_array<U, V, const N: usize>( &mut self, message: &Vec<U>, cipher: &mut [V; N], ) -> u64
Vec<U> object with the padding defined
according to PKCS #7 in ECB (Electronic CodeBook) mode, and
stores the encrypted data in array [V; N]. Read moreSource§fn encrypt_array<U, const N: usize>(
&mut self,
message: &[U; N],
cipher: *mut u8,
) -> u64where
U: SmallUInt,
fn encrypt_array<U, const N: usize>(
&mut self,
message: &[U; N],
cipher: *mut u8,
) -> u64where
U: SmallUInt,
[U; N] object with the padding
defined according to PKCS #7 in ECB (Electronic CodeBook) mode. Read moreSource§fn encrypt_array_into_vec<U, V, const N: usize>(
&mut self,
message: &[U; N],
cipher: &mut Vec<V>,
) -> u64
fn encrypt_array_into_vec<U, V, const N: usize>( &mut self, message: &[U; N], cipher: &mut Vec<V>, ) -> u64
[U; N] object with the padding
according to PKCS #7 in ECB (Electronic CodeBook) mode, and stores the
encrypted data in Vec<V>. Read moreSource§fn encrypt_array_into_array<U, V, const N: usize, const M: usize>(
&mut self,
message: &[U; N],
cipher: &mut [V; M],
) -> u64
fn encrypt_array_into_array<U, V, const N: usize, const M: usize>( &mut self, message: &[U; N], cipher: &mut [V; M], ) -> u64
[U; N] object with the padding
according to PKCS #7 in ECB (Electronic CodeBook) mode, and stores the
encrypted data in array [V; M]. Read moreSource§fn decrypt_into_vec<U>(
&mut self,
cipher: *const u8,
length_in_bytes: u64,
message: &mut Vec<U>,
) -> u64where
U: SmallUInt,
fn decrypt_into_vec<U>(
&mut self,
cipher: *const u8,
length_in_bytes: u64,
message: &mut Vec<U>,
) -> u64where
U: SmallUInt,
Vec<U>. Read moreSource§fn decrypt_into_string(
&mut self,
cipher: *const u8,
length_in_bytes: u64,
message: &mut String,
) -> u64
fn decrypt_into_string( &mut self, cipher: *const u8, length_in_bytes: u64, message: &mut String, ) -> u64
String. Read moreSource§fn decrypt_vec<U>(&mut self, cipher: &Vec<U>, message: *mut u8) -> u64where
U: SmallUInt,
fn decrypt_vec<U>(&mut self, cipher: &Vec<U>, message: *mut u8) -> u64where
U: SmallUInt,
Vec<U> object with the padding defined
according to PKCS #7 in ECB (Electronic CodeBook) mode. Read moreSource§fn decrypt_vec_into_vec<U, V>(
&mut self,
cipher: &Vec<U>,
message: &mut Vec<V>,
) -> u64
fn decrypt_vec_into_vec<U, V>( &mut self, cipher: &Vec<U>, message: &mut Vec<V>, ) -> u64
Vec<U> object with the padding defined
according to PKCS #7 in ECB (Electronic CodeBook) mode, and
stores the decrypted data in Vec<V>. Read moreSource§fn decrypt_vec_into_array<U, V, const N: usize>(
&mut self,
cipher: &Vec<U>,
message: &mut [V; N],
) -> u64
fn decrypt_vec_into_array<U, V, const N: usize>( &mut self, cipher: &Vec<U>, message: &mut [V; N], ) -> u64
Vec<U> object with the padding defined
according to PKCS #7 in ECB (Electronic CodeBook) mode, and
stores the decrypted data in array [V; N]. Read moreSource§fn decrypt_vec_into_string<U>(
&mut self,
cipher: &Vec<U>,
message: &mut String,
) -> u64where
U: SmallUInt,
fn decrypt_vec_into_string<U>(
&mut self,
cipher: &Vec<U>,
message: &mut String,
) -> u64where
U: SmallUInt,
str with the padding defined according to
PKCS #7 in ECB (Electronic CodeBook) mode, and stores the
decrypted data in String. Read moreSource§fn decrypt_array<U, const N: usize>(
&mut self,
cipher: &[U; N],
message: *mut u8,
) -> u64where
U: SmallUInt,
fn decrypt_array<U, const N: usize>(
&mut self,
cipher: &[U; N],
message: *mut u8,
) -> u64where
U: SmallUInt,
[U; N] object with the padding
defined according to PKCS #7 in ECB (Electronic CodeBook) mode. Read moreSource§fn decrypt_array_into_vec<U, V, const N: usize>(
&mut self,
cipher: &[U; N],
message: &mut Vec<V>,
) -> u64
fn decrypt_array_into_vec<U, V, const N: usize>( &mut self, cipher: &[U; N], message: &mut Vec<V>, ) -> u64
[U; N] object with the padding
defined according to PKCS #7 in ECB (Electronic CodeBook) mode,
and stores the decrypted data in Vec<V>. Read moreSource§fn decrypt_array_into_array<U, V, const N: usize, const M: usize>(
&mut self,
cipher: &[U; N],
message: &mut [V; M],
) -> u64
fn decrypt_array_into_array<U, V, const N: usize, const M: usize>( &mut self, cipher: &[U; N], message: &mut [V; M], ) -> u64
[U; N] object with the padding
defined according to PKCS #7 in ECB (Electronic CodeBook) mode,
and stores the decrypted data in array [V; M]. Read moreSource§fn decrypt_array_into_string<U, const N: usize>(
&mut self,
cipher: &[U; N],
message: &mut String,
) -> u64where
U: SmallUInt,
fn decrypt_array_into_string<U, const N: usize>(
&mut self,
cipher: &[U; N],
message: &mut String,
) -> u64where
U: SmallUInt,
[U; N] object with the padding
defined according to PKCS #7 in ECB (Electronic CodeBook) mode,
and stores the decrypted data in String. Read moreSource§impl<const ROUND: usize, const NK: usize, const IRREDUCIBLE: u8, const AFFINE_MUL: u64, const AFFINE_ADD: u8, const SR0: usize, const SR1: usize, const SR2: usize, const SR3: usize, const MC00: u8, const MC01: u8, const MC02: u8, const MC03: u8, const MC10: u8, const MC11: u8, const MC12: u8, const MC13: u8, const MC20: u8, const MC21: u8, const MC22: u8, const MC23: u8, const MC30: u8, const MC31: u8, const MC32: u8, const MC33: u8, const RC0: u32, const RC1: u32, const RC2: u32, const RC3: u32, const RC4: u32, const RC5: u32, const RC6: u32, const RC7: u32, const RC8: u32, const RC9: u32, const ROT: u32> Neg for Rijndael_Generic<ROUND, 2, NK, IRREDUCIBLE, AFFINE_MUL, AFFINE_ADD, SR0, SR1, SR2, SR3, MC00, MC01, MC02, MC03, MC10, MC11, MC12, MC13, MC20, MC21, MC22, MC23, MC30, MC31, MC32, MC33, RC0, RC1, RC2, RC3, RC4, RC5, RC6, RC7, RC8, RC9, ROT>
impl<const ROUND: usize, const NK: usize, const IRREDUCIBLE: u8, const AFFINE_MUL: u64, const AFFINE_ADD: u8, const SR0: usize, const SR1: usize, const SR2: usize, const SR3: usize, const MC00: u8, const MC01: u8, const MC02: u8, const MC03: u8, const MC10: u8, const MC11: u8, const MC12: u8, const MC13: u8, const MC20: u8, const MC21: u8, const MC22: u8, const MC23: u8, const MC30: u8, const MC31: u8, const MC32: u8, const MC33: u8, const RC0: u32, const RC1: u32, const RC2: u32, const RC3: u32, const RC4: u32, const RC5: u32, const RC6: u32, const RC7: u32, const RC8: u32, const RC9: u32, const ROT: u32> Neg for Rijndael_Generic<ROUND, 2, NK, IRREDUCIBLE, AFFINE_MUL, AFFINE_ADD, SR0, SR1, SR2, SR3, MC00, MC01, MC02, MC03, MC10, MC11, MC12, MC13, MC20, MC21, MC22, MC23, MC30, MC31, MC32, MC33, RC0, RC1, RC2, RC3, RC4, RC5, RC6, RC7, RC8, RC9, ROT>
Source§type Output = Rijndael_Generic<ROUND, 2, NK, IRREDUCIBLE, AFFINE_MUL, AFFINE_ADD, SR0, SR1, SR2, SR3, MC00, MC01, MC02, MC03, MC10, MC11, MC12, MC13, MC20, MC21, MC22, MC23, MC30, MC31, MC32, MC33, RC0, RC1, RC2, RC3, RC4, RC5, RC6, RC7, RC8, RC9, ROT>
type Output = Rijndael_Generic<ROUND, 2, NK, IRREDUCIBLE, AFFINE_MUL, AFFINE_ADD, SR0, SR1, SR2, SR3, MC00, MC01, MC02, MC03, MC10, MC11, MC12, MC13, MC20, MC21, MC22, MC23, MC30, MC31, MC32, MC33, RC0, RC1, RC2, RC3, RC4, RC5, RC6, RC7, RC8, RC9, ROT>
- operator.Source§impl<const ROUND: usize, const NK: usize, const IRREDUCIBLE: u8, const AFFINE_MUL: u64, const AFFINE_ADD: u8, const SR0: usize, const SR1: usize, const SR2: usize, const SR3: usize, const MC00: u8, const MC01: u8, const MC02: u8, const MC03: u8, const MC10: u8, const MC11: u8, const MC12: u8, const MC13: u8, const MC20: u8, const MC21: u8, const MC22: u8, const MC23: u8, const MC30: u8, const MC31: u8, const MC32: u8, const MC33: u8, const RC0: u32, const RC1: u32, const RC2: u32, const RC3: u32, const RC4: u32, const RC5: u32, const RC6: u32, const RC7: u32, const RC8: u32, const RC9: u32, const ROT: u32> Neg for Rijndael_Generic<ROUND, 4, NK, IRREDUCIBLE, AFFINE_MUL, AFFINE_ADD, SR0, SR1, SR2, SR3, MC00, MC01, MC02, MC03, MC10, MC11, MC12, MC13, MC20, MC21, MC22, MC23, MC30, MC31, MC32, MC33, RC0, RC1, RC2, RC3, RC4, RC5, RC6, RC7, RC8, RC9, ROT>
impl<const ROUND: usize, const NK: usize, const IRREDUCIBLE: u8, const AFFINE_MUL: u64, const AFFINE_ADD: u8, const SR0: usize, const SR1: usize, const SR2: usize, const SR3: usize, const MC00: u8, const MC01: u8, const MC02: u8, const MC03: u8, const MC10: u8, const MC11: u8, const MC12: u8, const MC13: u8, const MC20: u8, const MC21: u8, const MC22: u8, const MC23: u8, const MC30: u8, const MC31: u8, const MC32: u8, const MC33: u8, const RC0: u32, const RC1: u32, const RC2: u32, const RC3: u32, const RC4: u32, const RC5: u32, const RC6: u32, const RC7: u32, const RC8: u32, const RC9: u32, const ROT: u32> Neg for Rijndael_Generic<ROUND, 4, NK, IRREDUCIBLE, AFFINE_MUL, AFFINE_ADD, SR0, SR1, SR2, SR3, MC00, MC01, MC02, MC03, MC10, MC11, MC12, MC13, MC20, MC21, MC22, MC23, MC30, MC31, MC32, MC33, RC0, RC1, RC2, RC3, RC4, RC5, RC6, RC7, RC8, RC9, ROT>
Source§type Output = Rijndael_Generic<ROUND, 4, NK, IRREDUCIBLE, AFFINE_MUL, AFFINE_ADD, SR0, SR1, SR2, SR3, MC00, MC01, MC02, MC03, MC10, MC11, MC12, MC13, MC20, MC21, MC22, MC23, MC30, MC31, MC32, MC33, RC0, RC1, RC2, RC3, RC4, RC5, RC6, RC7, RC8, RC9, ROT>
type Output = Rijndael_Generic<ROUND, 4, NK, IRREDUCIBLE, AFFINE_MUL, AFFINE_ADD, SR0, SR1, SR2, SR3, MC00, MC01, MC02, MC03, MC10, MC11, MC12, MC13, MC20, MC21, MC22, MC23, MC30, MC31, MC32, MC33, RC0, RC1, RC2, RC3, RC4, RC5, RC6, RC7, RC8, RC9, ROT>
- operator.Source§impl<const ROUND: usize, const NB: usize, const NK: usize, const IRREDUCIBLE: u8, const AFFINE_MUL: u64, const AFFINE_ADD: u8, const SR0: usize, const SR1: usize, const SR2: usize, const SR3: usize, const MC00: u8, const MC01: u8, const MC02: u8, const MC03: u8, const MC10: u8, const MC11: u8, const MC12: u8, const MC13: u8, const MC20: u8, const MC21: u8, const MC22: u8, const MC23: u8, const MC30: u8, const MC31: u8, const MC32: u8, const MC33: u8, const RC0: u32, const RC1: u32, const RC2: u32, const RC3: u32, const RC4: u32, const RC5: u32, const RC6: u32, const RC7: u32, const RC8: u32, const RC9: u32, const ROT: u32> OFB<[u32; NB]> for Rijndael_Generic<ROUND, NB, NK, IRREDUCIBLE, AFFINE_MUL, AFFINE_ADD, SR0, SR1, SR2, SR3, MC00, MC01, MC02, MC03, MC10, MC11, MC12, MC13, MC20, MC21, MC22, MC23, MC30, MC31, MC32, MC33, RC0, RC1, RC2, RC3, RC4, RC5, RC6, RC7, RC8, RC9, ROT>
impl<const ROUND: usize, const NB: usize, const NK: usize, const IRREDUCIBLE: u8, const AFFINE_MUL: u64, const AFFINE_ADD: u8, const SR0: usize, const SR1: usize, const SR2: usize, const SR3: usize, const MC00: u8, const MC01: u8, const MC02: u8, const MC03: u8, const MC10: u8, const MC11: u8, const MC12: u8, const MC13: u8, const MC20: u8, const MC21: u8, const MC22: u8, const MC23: u8, const MC30: u8, const MC31: u8, const MC32: u8, const MC33: u8, const RC0: u32, const RC1: u32, const RC2: u32, const RC3: u32, const RC4: u32, const RC5: u32, const RC6: u32, const RC7: u32, const RC8: u32, const RC9: u32, const ROT: u32> OFB<[u32; NB]> for Rijndael_Generic<ROUND, NB, NK, IRREDUCIBLE, AFFINE_MUL, AFFINE_ADD, SR0, SR1, SR2, SR3, MC00, MC01, MC02, MC03, MC10, MC11, MC12, MC13, MC20, MC21, MC22, MC23, MC30, MC31, MC32, MC33, RC0, RC1, RC2, RC3, RC4, RC5, RC6, RC7, RC8, RC9, ROT>
Source§fn encrypt(
&mut self,
iv: [u32; NB],
message: *const u8,
length_in_bytes: u64,
cipher: *mut u8,
) -> u64
fn encrypt( &mut self, iv: [u32; NB], message: *const u8, length_in_bytes: u64, cipher: *mut u8, ) -> u64
Source§fn encrypt_into_array<U, const N: usize>(
&mut self,
iv: [u32; NB],
message: *const u8,
length_in_bytes: u64,
cipher: &mut [U; N],
) -> u64where
U: SmallUInt,
fn encrypt_into_array<U, const N: usize>(
&mut self,
iv: [u32; NB],
message: *const u8,
length_in_bytes: u64,
cipher: &mut [U; N],
) -> u64where
U: SmallUInt,
[U; N]. Read moreSource§fn encrypt_into_vec<U>(
&mut self,
iv: [u32; NB],
message: *const u8,
length_in_bytes: u64,
cipher: &mut Vec<U>,
) -> u64where
U: SmallUInt,
fn encrypt_into_vec<U>(
&mut self,
iv: [u32; NB],
message: *const u8,
length_in_bytes: u64,
cipher: &mut Vec<U>,
) -> u64where
U: SmallUInt,
Vec<U>. Read moreSource§fn decrypt_into_array<U, const N: usize>(
&mut self,
iv: [u32; NB],
cipher: *const u8,
length_in_bytes: u64,
message: &mut [U; N],
) -> u64where
U: SmallUInt,
fn decrypt_into_array<U, const N: usize>(
&mut self,
iv: [u32; NB],
cipher: *const u8,
length_in_bytes: u64,
message: &mut [U; N],
) -> u64where
U: SmallUInt,
[U; N]. Read moreSource§fn encrypt_str(&mut self, iv: T, message: &str, cipher: *mut u8) -> u64
fn encrypt_str(&mut self, iv: T, message: &str, cipher: *mut u8) -> u64
str object without any padding in OFB (Output
FeedBack) mode. Read moreSource§fn encrypt_str_into_vec<U>(
&mut self,
iv: T,
message: &str,
cipher: &mut Vec<U>,
) -> u64where
U: SmallUInt,
fn encrypt_str_into_vec<U>(
&mut self,
iv: T,
message: &str,
cipher: &mut Vec<U>,
) -> u64where
U: SmallUInt,
str without any padding in OFB (Output FeedBack)
mode, and stores the encrypted data in Vec<U>. Read moreSource§fn encrypt_str_into_array<U, const N: usize>(
&mut self,
iv: T,
message: &str,
cipher: &mut [U; N],
) -> u64where
U: SmallUInt,
fn encrypt_str_into_array<U, const N: usize>(
&mut self,
iv: T,
message: &str,
cipher: &mut [U; N],
) -> u64where
U: SmallUInt,
str object without any padding in OFB (Output
FeedBack) mode, and stores the encrypted data in array [U; N]. Read moreSource§fn encrypt_string(&mut self, iv: T, message: &String, cipher: *mut u8) -> u64
fn encrypt_string(&mut self, iv: T, message: &String, cipher: *mut u8) -> u64
String object without any padding
in OFB (Output FeedBack) mode. Read moreSource§fn encrypt_string_into_vec<U>(
&mut self,
iv: T,
message: &String,
cipher: &mut Vec<U>,
) -> u64where
U: SmallUInt,
fn encrypt_string_into_vec<U>(
&mut self,
iv: T,
message: &String,
cipher: &mut Vec<U>,
) -> u64where
U: SmallUInt,
String object without any padding in
OFB (Output FeedBack) mode, and stores the encrypted data in Vec<U>. Read moreSource§fn encrypt_string_into_array<U, const N: usize>(
&mut self,
iv: T,
message: &String,
cipher: &mut [U; N],
) -> u64where
U: SmallUInt,
fn encrypt_string_into_array<U, const N: usize>(
&mut self,
iv: T,
message: &String,
cipher: &mut [U; N],
) -> u64where
U: SmallUInt,
String object without any padding in OFB
(Output FeedBack) mode, and stores the encrypted data in array [U; N]. Read moreSource§fn encrypt_vec<U>(&mut self, iv: T, message: &Vec<U>, cipher: *mut u8) -> u64where
U: SmallUInt,
fn encrypt_vec<U>(&mut self, iv: T, message: &Vec<U>, cipher: *mut u8) -> u64where
U: SmallUInt,
Vec<U> object without any padding
in OFB (Output FeedBack) mode. Read moreSource§fn encrypt_vec_into_vec<U, V>(
&mut self,
iv: T,
message: &Vec<U>,
cipher: &mut Vec<V>,
) -> u64
fn encrypt_vec_into_vec<U, V>( &mut self, iv: T, message: &Vec<U>, cipher: &mut Vec<V>, ) -> u64
Vec<U> object without any padding in
OFB (Output FeedBack) mode, and stores the encrypted data in Vec<V>. Read moreSource§fn encrypt_vec_into_array<U, V, const N: usize>(
&mut self,
iv: T,
message: &Vec<U>,
cipher: &mut [V; N],
) -> u64
fn encrypt_vec_into_array<U, V, const N: usize>( &mut self, iv: T, message: &Vec<U>, cipher: &mut [V; N], ) -> u64
Vec<U> object without any padding in OFB
(Output FeedBack) mode, and stores the encrypted data in array [V; N]. Read moreSource§fn encrypt_array<U, const N: usize>(
&mut self,
iv: T,
message: &[U; N],
cipher: *mut u8,
) -> u64where
U: SmallUInt,
fn encrypt_array<U, const N: usize>(
&mut self,
iv: T,
message: &[U; N],
cipher: *mut u8,
) -> u64where
U: SmallUInt,
[U; N] object without any
padding in OFB (Output FeedBack) mode. Read moreSource§fn encrypt_array_into_vec<U, V, const N: usize>(
&mut self,
iv: T,
message: &[U; N],
cipher: &mut Vec<V>,
) -> u64
fn encrypt_array_into_vec<U, V, const N: usize>( &mut self, iv: T, message: &[U; N], cipher: &mut Vec<V>, ) -> u64
[U; N] object without any padding
in OFB (Output FeedBack) mode, and stores the encrypted data in Vec<V>. Read moreSource§fn encrypt_array_into_array<U, V, const N: usize, const M: usize>(
&mut self,
iv: T,
message: &[U; N],
cipher: &mut [V; M],
) -> u64
fn encrypt_array_into_array<U, V, const N: usize, const M: usize>( &mut self, iv: T, message: &[U; N], cipher: &mut [V; M], ) -> u64
[U; N] object without any padding
in OFB (Output FeedBack) mode, and stores the encrypted data
in array [V; M]. Read moreSource§fn decrypt(
&mut self,
iv: T,
cipher: *const u8,
length_in_bytes: u64,
message: *mut u8,
) -> u64
fn decrypt( &mut self, iv: T, cipher: *const u8, length_in_bytes: u64, message: *mut u8, ) -> u64
Source§fn decrypt_into_vec<U>(
&mut self,
iv: T,
cipher: *const u8,
length_in_bytes: u64,
message: &mut Vec<U>,
) -> u64where
U: SmallUInt,
fn decrypt_into_vec<U>(
&mut self,
iv: T,
cipher: *const u8,
length_in_bytes: u64,
message: &mut Vec<U>,
) -> u64where
U: SmallUInt,
Vec<U>. Read moreSource§fn decrypt_into_string(
&mut self,
iv: T,
cipher: *const u8,
length_in_bytes: u64,
message: &mut String,
) -> u64
fn decrypt_into_string( &mut self, iv: T, cipher: *const u8, length_in_bytes: u64, message: &mut String, ) -> u64
String. Read moreSource§fn decrypt_vec<U>(&mut self, iv: T, cipher: &Vec<U>, message: *mut u8) -> u64where
U: SmallUInt,
fn decrypt_vec<U>(&mut self, iv: T, cipher: &Vec<U>, message: *mut u8) -> u64where
U: SmallUInt,
Vec<U> object without any padding
in OFB (Output FeedBack) mode. Read moreSource§fn decrypt_vec_into_vec<U, V>(
&mut self,
iv: T,
cipher: &Vec<U>,
message: &mut Vec<V>,
) -> u64
fn decrypt_vec_into_vec<U, V>( &mut self, iv: T, cipher: &Vec<U>, message: &mut Vec<V>, ) -> u64
Vec<U> object without any padding in
OFB (Output FeedBack) mode, and stores the decrypted data in Vec<V>. Read moreSource§fn decrypt_vec_into_array<U, V, const N: usize>(
&mut self,
iv: T,
cipher: &Vec<U>,
message: &mut [V; N],
) -> u64
fn decrypt_vec_into_array<U, V, const N: usize>( &mut self, iv: T, cipher: &Vec<U>, message: &mut [V; N], ) -> u64
Vec<U> object without any padding in OFB
(Output FeedBack) mode, and stores the decrypted data in array [V; N]. Read moreSource§fn decrypt_vec_into_string<U>(
&mut self,
iv: T,
cipher: &Vec<U>,
message: &mut String,
) -> u64where
U: SmallUInt,
fn decrypt_vec_into_string<U>(
&mut self,
iv: T,
cipher: &Vec<U>,
message: &mut String,
) -> u64where
U: SmallUInt,
str without any padding in OFB (Output FeedBack)
mode, and stores the decrypted data in String. Read moreSource§fn decrypt_array<U, const N: usize>(
&mut self,
iv: T,
cipher: &[U; N],
message: *mut u8,
) -> u64where
U: SmallUInt,
fn decrypt_array<U, const N: usize>(
&mut self,
iv: T,
cipher: &[U; N],
message: *mut u8,
) -> u64where
U: SmallUInt,
[U; N] object without any padding
in OFB (Output FeedBack) mode. Read moreSource§fn decrypt_array_into_vec<U, V, const N: usize>(
&mut self,
iv: T,
cipher: &[U; N],
message: &mut Vec<V>,
) -> u64
fn decrypt_array_into_vec<U, V, const N: usize>( &mut self, iv: T, cipher: &[U; N], message: &mut Vec<V>, ) -> u64
[U; N] object without any padding
in OFB (Output FeedBack) mode, and stores the decrypted data in Vec<V>. Read moreSource§impl<const ROUND: usize, const NB: usize, const NK: usize, const IRREDUCIBLE: u8, const AFFINE_MUL: u64, const AFFINE_ADD: u8, const SR0: usize, const SR1: usize, const SR2: usize, const SR3: usize, const MC00: u8, const MC01: u8, const MC02: u8, const MC03: u8, const MC10: u8, const MC11: u8, const MC12: u8, const MC13: u8, const MC20: u8, const MC21: u8, const MC22: u8, const MC23: u8, const MC30: u8, const MC31: u8, const MC32: u8, const MC33: u8, const RC0: u32, const RC1: u32, const RC2: u32, const RC3: u32, const RC4: u32, const RC5: u32, const RC6: u32, const RC7: u32, const RC8: u32, const RC9: u32, const ROT: u32> PCBC_ISO<[u32; NB]> for Rijndael_Generic<ROUND, NB, NK, IRREDUCIBLE, AFFINE_MUL, AFFINE_ADD, SR0, SR1, SR2, SR3, MC00, MC01, MC02, MC03, MC10, MC11, MC12, MC13, MC20, MC21, MC22, MC23, MC30, MC31, MC32, MC33, RC0, RC1, RC2, RC3, RC4, RC5, RC6, RC7, RC8, RC9, ROT>
impl<const ROUND: usize, const NB: usize, const NK: usize, const IRREDUCIBLE: u8, const AFFINE_MUL: u64, const AFFINE_ADD: u8, const SR0: usize, const SR1: usize, const SR2: usize, const SR3: usize, const MC00: u8, const MC01: u8, const MC02: u8, const MC03: u8, const MC10: u8, const MC11: u8, const MC12: u8, const MC13: u8, const MC20: u8, const MC21: u8, const MC22: u8, const MC23: u8, const MC30: u8, const MC31: u8, const MC32: u8, const MC33: u8, const RC0: u32, const RC1: u32, const RC2: u32, const RC3: u32, const RC4: u32, const RC5: u32, const RC6: u32, const RC7: u32, const RC8: u32, const RC9: u32, const ROT: u32> PCBC_ISO<[u32; NB]> for Rijndael_Generic<ROUND, NB, NK, IRREDUCIBLE, AFFINE_MUL, AFFINE_ADD, SR0, SR1, SR2, SR3, MC00, MC01, MC02, MC03, MC10, MC11, MC12, MC13, MC20, MC21, MC22, MC23, MC30, MC31, MC32, MC33, RC0, RC1, RC2, RC3, RC4, RC5, RC6, RC7, RC8, RC9, ROT>
Source§fn encrypt(
&mut self,
iv: [u32; NB],
message: *const u8,
length_in_bytes: u64,
cipher: *mut u8,
) -> u64
fn encrypt( &mut self, iv: [u32; NB], message: *const u8, length_in_bytes: u64, cipher: *mut u8, ) -> u64
Source§fn decrypt(
&mut self,
iv: [u32; NB],
cipher: *const u8,
length_in_bytes: u64,
message: *mut u8,
) -> u64
fn decrypt( &mut self, iv: [u32; NB], cipher: *const u8, length_in_bytes: u64, message: *mut u8, ) -> u64
Source§fn encrypt_into_array<U, const N: usize>(
&mut self,
iv: [u32; NB],
message: *const u8,
length_in_bytes: u64,
cipher: &mut [U; N],
) -> u64where
U: SmallUInt,
fn encrypt_into_array<U, const N: usize>(
&mut self,
iv: [u32; NB],
message: *const u8,
length_in_bytes: u64,
cipher: &mut [U; N],
) -> u64where
U: SmallUInt,
[U; N]. Read moreSource§fn encrypt_into_vec<U>(
&mut self,
iv: [u32; NB],
message: *const u8,
length_in_bytes: u64,
cipher: &mut Vec<U>,
) -> u64where
U: SmallUInt,
fn encrypt_into_vec<U>(
&mut self,
iv: [u32; NB],
message: *const u8,
length_in_bytes: u64,
cipher: &mut Vec<U>,
) -> u64where
U: SmallUInt,
Vec<U>. Read moreSource§fn decrypt_into_array<U, const N: usize>(
&mut self,
iv: [u32; NB],
cipher: *const u8,
length_in_bytes: u64,
message: &mut [U; N],
) -> u64where
U: SmallUInt,
fn decrypt_into_array<U, const N: usize>(
&mut self,
iv: [u32; NB],
cipher: *const u8,
length_in_bytes: u64,
message: &mut [U; N],
) -> u64where
U: SmallUInt,
[U; N]. Read moreSource§fn encrypt_str(&mut self, iv: T, message: &str, cipher: *mut u8) -> u64
fn encrypt_str(&mut self, iv: T, message: &str, cipher: *mut u8) -> u64
str object with the padding defined
according to ISO 7816-4 in PCBC (Propagation Cipher-Block Chaining) mode. Read moreSource§fn encrypt_str_into_vec<U>(
&mut self,
iv: T,
message: &str,
cipher: &mut Vec<U>,
) -> u64where
U: SmallUInt,
fn encrypt_str_into_vec<U>(
&mut self,
iv: T,
message: &str,
cipher: &mut Vec<U>,
) -> u64where
U: SmallUInt,
str with the padding defined according to
ISO 7816-4 in PCBC (Propagation Cipher-Block Chaining) mode, and stores the
encrypted data in Vec<U>. Read moreSource§fn encrypt_str_into_array<U, const N: usize>(
&mut self,
iv: T,
message: &str,
cipher: &mut [U; N],
) -> u64where
U: SmallUInt,
fn encrypt_str_into_array<U, const N: usize>(
&mut self,
iv: T,
message: &str,
cipher: &mut [U; N],
) -> u64where
U: SmallUInt,
str object with the padding defined
according to ISO 7816-4 in PCBC (Propagation Cipher-Block Chaining) mode,
and stores the encrypted data in array [U; N]. Read moreSource§fn encrypt_string(&mut self, iv: T, message: &String, cipher: *mut u8) -> u64
fn encrypt_string(&mut self, iv: T, message: &String, cipher: *mut u8) -> u64
String object with the padding
according to ISO 7816-4 in PCBC (Propagation Cipher-Block Chaining) mode. Read moreSource§fn encrypt_string_into_vec<U>(
&mut self,
iv: T,
message: &String,
cipher: &mut Vec<U>,
) -> u64where
U: SmallUInt,
fn encrypt_string_into_vec<U>(
&mut self,
iv: T,
message: &String,
cipher: &mut Vec<U>,
) -> u64where
U: SmallUInt,
String object with the padding
according to ISO 7816-4 in PCBC (Propagation Cipher-Block Chaining) mode,
and stores the encrypted data in Vec<U>. Read moreSource§fn encrypt_string_into_array<U, const N: usize>(
&mut self,
iv: T,
message: &String,
cipher: &mut [U; N],
) -> u64where
U: SmallUInt,
fn encrypt_string_into_array<U, const N: usize>(
&mut self,
iv: T,
message: &String,
cipher: &mut [U; N],
) -> u64where
U: SmallUInt,
String object with the padding
according to ISO 7816-4 in PCBC (Propagation Cipher-Block Chaining) mode,
and stores the encrypted data in array [U; N]. Read moreSource§fn encrypt_vec<U>(&mut self, iv: T, message: &Vec<U>, cipher: *mut u8) -> u64where
U: SmallUInt,
fn encrypt_vec<U>(&mut self, iv: T, message: &Vec<U>, cipher: *mut u8) -> u64where
U: SmallUInt,
Vec<U> object with the padding defined
according to ISO 7816-4 in PCBC (Propagation Cipher-Block Chaining) mode. Read moreSource§fn encrypt_vec_into_vec<U, V>(
&mut self,
iv: T,
message: &Vec<U>,
cipher: &mut Vec<V>,
) -> u64
fn encrypt_vec_into_vec<U, V>( &mut self, iv: T, message: &Vec<U>, cipher: &mut Vec<V>, ) -> u64
Vec<U> object with the padding defined
according to ISO 7816-4 in PCBC (Propagation Cipher-Block Chaining) mode, and
stores the encrypted data in Vec<V>. Read moreSource§fn encrypt_vec_into_array<U, V, const N: usize>(
&mut self,
iv: T,
message: &Vec<U>,
cipher: &mut [V; N],
) -> u64
fn encrypt_vec_into_array<U, V, const N: usize>( &mut self, iv: T, message: &Vec<U>, cipher: &mut [V; N], ) -> u64
Vec<U> object with the padding defined
according to ISO 7816-4 in PCBC (Propagation Cipher-Block Chaining) mode, and
stores the encrypted data in array [V; N]. Read moreSource§fn encrypt_array<U, const N: usize>(
&mut self,
iv: T,
message: &[U; N],
cipher: *mut u8,
) -> u64where
U: SmallUInt,
fn encrypt_array<U, const N: usize>(
&mut self,
iv: T,
message: &[U; N],
cipher: *mut u8,
) -> u64where
U: SmallUInt,
[U; N] object with the padding
defined according to ISO 7816-4 in PCBC (Propagation Cipher-Block Chaining) mode. Read moreSource§fn encrypt_array_into_vec<U, V, const N: usize>(
&mut self,
iv: T,
message: &[U; N],
cipher: &mut Vec<V>,
) -> u64
fn encrypt_array_into_vec<U, V, const N: usize>( &mut self, iv: T, message: &[U; N], cipher: &mut Vec<V>, ) -> u64
[U; N] object with the padding
according to ISO 7816-4 in PCBC (Propagation Cipher-Block Chaining) mode, and stores the
encrypted data in Vec<V>. Read moreSource§fn encrypt_array_into_array<U, V, const N: usize, const M: usize>(
&mut self,
iv: T,
message: &[U; N],
cipher: &mut [V; M],
) -> u64
fn encrypt_array_into_array<U, V, const N: usize, const M: usize>( &mut self, iv: T, message: &[U; N], cipher: &mut [V; M], ) -> u64
[U; N] object with the padding
according to ISO 7816-4 in PCBC (Propagation Cipher-Block Chaining) mode, and stores the
encrypted data in array [V; M]. Read moreSource§fn decrypt_into_vec<U>(
&mut self,
iv: T,
cipher: *const u8,
length_in_bytes: u64,
message: &mut Vec<U>,
) -> u64where
U: SmallUInt,
fn decrypt_into_vec<U>(
&mut self,
iv: T,
cipher: *const u8,
length_in_bytes: u64,
message: &mut Vec<U>,
) -> u64where
U: SmallUInt,
Vec<U>. Read moreSource§fn decrypt_into_string(
&mut self,
iv: T,
cipher: *const u8,
length_in_bytes: u64,
message: &mut String,
) -> u64
fn decrypt_into_string( &mut self, iv: T, cipher: *const u8, length_in_bytes: u64, message: &mut String, ) -> u64
String. Read moreSource§fn decrypt_vec<U>(&mut self, iv: T, cipher: &Vec<U>, message: *mut u8) -> u64where
U: SmallUInt,
fn decrypt_vec<U>(&mut self, iv: T, cipher: &Vec<U>, message: *mut u8) -> u64where
U: SmallUInt,
Vec<U> object with the padding defined
according to ISO 7816-4 in PCBC (Propagation Cipher-Block Chaining) mode. Read moreSource§fn decrypt_vec_into_vec<U, V>(
&mut self,
iv: T,
cipher: &Vec<U>,
message: &mut Vec<V>,
) -> u64
fn decrypt_vec_into_vec<U, V>( &mut self, iv: T, cipher: &Vec<U>, message: &mut Vec<V>, ) -> u64
Vec<U> object with the padding defined
according to ISO 7816-4 in PCBC (Propagation Cipher-Block Chaining) mode, and
stores the decrypted data in Vec<V>. Read moreSource§fn decrypt_vec_into_array<U, V, const N: usize>(
&mut self,
iv: T,
cipher: &Vec<U>,
message: &mut [V; N],
) -> u64
fn decrypt_vec_into_array<U, V, const N: usize>( &mut self, iv: T, cipher: &Vec<U>, message: &mut [V; N], ) -> u64
Vec<U> object with the padding defined
according to ISO 7816-4 in PCBC (Propagation Cipher-Block Chaining) mode, and
stores the decrypted data in array [V; N]. Read moreSource§fn decrypt_vec_into_string<U>(
&mut self,
iv: T,
cipher: &Vec<U>,
message: &mut String,
) -> u64where
U: SmallUInt,
fn decrypt_vec_into_string<U>(
&mut self,
iv: T,
cipher: &Vec<U>,
message: &mut String,
) -> u64where
U: SmallUInt,
str with the padding defined according to
ISO 7816-4 in PCBC (Propagation Cipher-Block Chaining) mode, and stores the
decrypted data in String. Read moreSource§fn decrypt_array<U, const N: usize>(
&mut self,
iv: T,
cipher: &[U; N],
message: *mut u8,
) -> u64where
U: SmallUInt,
fn decrypt_array<U, const N: usize>(
&mut self,
iv: T,
cipher: &[U; N],
message: *mut u8,
) -> u64where
U: SmallUInt,
[U; N] object with the padding
defined according to ISO 7816-4 in PCBC (Propagation Cipher-Block Chaining) mode. Read moreSource§fn decrypt_array_into_vec<U, V, const N: usize>(
&mut self,
iv: T,
cipher: &[U; N],
message: &mut Vec<V>,
) -> u64
fn decrypt_array_into_vec<U, V, const N: usize>( &mut self, iv: T, cipher: &[U; N], message: &mut Vec<V>, ) -> u64
[U; N] object with the padding
defined according to ISO 7816-4 in PCBC (Propagation Cipher-Block Chaining) mode,
and stores the decrypted data in Vec<V>. Read moreSource§fn decrypt_array_into_array<U, V, const N: usize, const M: usize>(
&mut self,
iv: T,
cipher: &[U; N],
message: &mut [V; M],
) -> u64
fn decrypt_array_into_array<U, V, const N: usize, const M: usize>( &mut self, iv: T, cipher: &[U; N], message: &mut [V; M], ) -> u64
[U; N] object with the padding
defined according to ISO 7816-4 in PCBC (Propagation Cipher-Block Chaining) mode,
and stores the decrypted data in array [V; M]. Read moreSource§fn decrypt_array_into_string<U, const N: usize>(
&mut self,
iv: T,
cipher: &[U; N],
message: &mut String,
) -> u64where
U: SmallUInt,
fn decrypt_array_into_string<U, const N: usize>(
&mut self,
iv: T,
cipher: &[U; N],
message: &mut String,
) -> u64where
U: SmallUInt,
[U; N] object with the padding
defined according to ISO 7816-4 in PCBC (Propagation Cipher-Block Chaining) mode,
and stores the decrypted data in String. Read moreSource§impl<const ROUND: usize, const NB: usize, const NK: usize, const IRREDUCIBLE: u8, const AFFINE_MUL: u64, const AFFINE_ADD: u8, const SR0: usize, const SR1: usize, const SR2: usize, const SR3: usize, const MC00: u8, const MC01: u8, const MC02: u8, const MC03: u8, const MC10: u8, const MC11: u8, const MC12: u8, const MC13: u8, const MC20: u8, const MC21: u8, const MC22: u8, const MC23: u8, const MC30: u8, const MC31: u8, const MC32: u8, const MC33: u8, const RC0: u32, const RC1: u32, const RC2: u32, const RC3: u32, const RC4: u32, const RC5: u32, const RC6: u32, const RC7: u32, const RC8: u32, const RC9: u32, const ROT: u32> PCBC_PKCS7<[u32; NB]> for Rijndael_Generic<ROUND, NB, NK, IRREDUCIBLE, AFFINE_MUL, AFFINE_ADD, SR0, SR1, SR2, SR3, MC00, MC01, MC02, MC03, MC10, MC11, MC12, MC13, MC20, MC21, MC22, MC23, MC30, MC31, MC32, MC33, RC0, RC1, RC2, RC3, RC4, RC5, RC6, RC7, RC8, RC9, ROT>
impl<const ROUND: usize, const NB: usize, const NK: usize, const IRREDUCIBLE: u8, const AFFINE_MUL: u64, const AFFINE_ADD: u8, const SR0: usize, const SR1: usize, const SR2: usize, const SR3: usize, const MC00: u8, const MC01: u8, const MC02: u8, const MC03: u8, const MC10: u8, const MC11: u8, const MC12: u8, const MC13: u8, const MC20: u8, const MC21: u8, const MC22: u8, const MC23: u8, const MC30: u8, const MC31: u8, const MC32: u8, const MC33: u8, const RC0: u32, const RC1: u32, const RC2: u32, const RC3: u32, const RC4: u32, const RC5: u32, const RC6: u32, const RC7: u32, const RC8: u32, const RC9: u32, const ROT: u32> PCBC_PKCS7<[u32; NB]> for Rijndael_Generic<ROUND, NB, NK, IRREDUCIBLE, AFFINE_MUL, AFFINE_ADD, SR0, SR1, SR2, SR3, MC00, MC01, MC02, MC03, MC10, MC11, MC12, MC13, MC20, MC21, MC22, MC23, MC30, MC31, MC32, MC33, RC0, RC1, RC2, RC3, RC4, RC5, RC6, RC7, RC8, RC9, ROT>
Source§fn encrypt(
&mut self,
iv: [u32; NB],
message: *const u8,
length_in_bytes: u64,
cipher: *mut u8,
) -> u64
fn encrypt( &mut self, iv: [u32; NB], message: *const u8, length_in_bytes: u64, cipher: *mut u8, ) -> u64
Source§fn decrypt(
&mut self,
iv: [u32; NB],
cipher: *const u8,
length_in_bytes: u64,
message: *mut u8,
) -> u64
fn decrypt( &mut self, iv: [u32; NB], cipher: *const u8, length_in_bytes: u64, message: *mut u8, ) -> u64
Source§fn encrypt_into_array<U, const N: usize>(
&mut self,
iv: [u32; NB],
message: *const u8,
length_in_bytes: u64,
cipher: &mut [U; N],
) -> u64where
U: SmallUInt,
fn encrypt_into_array<U, const N: usize>(
&mut self,
iv: [u32; NB],
message: *const u8,
length_in_bytes: u64,
cipher: &mut [U; N],
) -> u64where
U: SmallUInt,
[U; N]. Read moreSource§fn encrypt_into_vec<U>(
&mut self,
iv: [u32; NB],
message: *const u8,
length_in_bytes: u64,
cipher: &mut Vec<U>,
) -> u64where
U: SmallUInt,
fn encrypt_into_vec<U>(
&mut self,
iv: [u32; NB],
message: *const u8,
length_in_bytes: u64,
cipher: &mut Vec<U>,
) -> u64where
U: SmallUInt,
Vec<U>. Read moreSource§fn decrypt_into_array<U, const N: usize>(
&mut self,
iv: [u32; NB],
cipher: *const u8,
length_in_bytes: u64,
message: &mut [U; N],
) -> u64where
U: SmallUInt,
fn decrypt_into_array<U, const N: usize>(
&mut self,
iv: [u32; NB],
cipher: *const u8,
length_in_bytes: u64,
message: &mut [U; N],
) -> u64where
U: SmallUInt,
[U; N]. Read moreSource§fn encrypt_str(&mut self, iv: T, message: &str, cipher: *mut u8) -> u64
fn encrypt_str(&mut self, iv: T, message: &str, cipher: *mut u8) -> u64
str object with the padding defined
according to PKCS #7 in PCBC (Propagation Cipher-Block Chaining) mode. Read moreSource§fn encrypt_str_into_vec<U>(
&mut self,
iv: T,
message: &str,
cipher: &mut Vec<U>,
) -> u64where
U: SmallUInt,
fn encrypt_str_into_vec<U>(
&mut self,
iv: T,
message: &str,
cipher: &mut Vec<U>,
) -> u64where
U: SmallUInt,
str with the padding defined according to
PKCS #7 in PCBC (Propagation Cipher-Block Chaining) mode, and stores the
encrypted data in Vec<U>. Read moreSource§fn encrypt_str_into_array<U, const N: usize>(
&mut self,
iv: T,
message: &str,
cipher: &mut [U; N],
) -> u64where
U: SmallUInt,
fn encrypt_str_into_array<U, const N: usize>(
&mut self,
iv: T,
message: &str,
cipher: &mut [U; N],
) -> u64where
U: SmallUInt,
str object with the padding defined
according to PKCS #7 in PCBC (Propagation Cipher-Block Chaining) mode,
and stores the encrypted data in array [U; N]. Read moreSource§fn encrypt_string(&mut self, iv: T, message: &String, cipher: *mut u8) -> u64
fn encrypt_string(&mut self, iv: T, message: &String, cipher: *mut u8) -> u64
String object with the padding
according to PKCS #7 in PCBC (Propagation Cipher-Block Chaining) mode. Read moreSource§fn encrypt_string_into_vec<U>(
&mut self,
iv: T,
message: &String,
cipher: &mut Vec<U>,
) -> u64where
U: SmallUInt,
fn encrypt_string_into_vec<U>(
&mut self,
iv: T,
message: &String,
cipher: &mut Vec<U>,
) -> u64where
U: SmallUInt,
String object with the padding
according to PKCS #7 in PCBC (Propagation Cipher-Block Chaining) mode,
and stores the encrypted data in Vec<U>. Read moreSource§fn encrypt_string_into_array<U, const N: usize>(
&mut self,
iv: T,
message: &String,
cipher: &mut [U; N],
) -> u64where
U: SmallUInt,
fn encrypt_string_into_array<U, const N: usize>(
&mut self,
iv: T,
message: &String,
cipher: &mut [U; N],
) -> u64where
U: SmallUInt,
String object with the padding
according to PKCS #7 in PCBC (Propagation Cipher-Block Chaining) mode,
and stores the encrypted data in array [U; N]. Read moreSource§fn encrypt_vec<U>(&mut self, iv: T, message: &Vec<U>, cipher: *mut u8) -> u64where
U: SmallUInt,
fn encrypt_vec<U>(&mut self, iv: T, message: &Vec<U>, cipher: *mut u8) -> u64where
U: SmallUInt,
Vec<U> object with the padding defined
according to PKCS #7 in PCBC (Propagation Cipher-Block Chaining) mode. Read moreSource§fn encrypt_vec_into_vec<U, V>(
&mut self,
iv: T,
message: &Vec<U>,
cipher: &mut Vec<V>,
) -> u64
fn encrypt_vec_into_vec<U, V>( &mut self, iv: T, message: &Vec<U>, cipher: &mut Vec<V>, ) -> u64
Vec<U> object with the padding defined
according to PKCS #7 in PCBC (Propagation Cipher-Block Chaining) mode, and
stores the encrypted data in Vec<V>. Read moreSource§fn encrypt_vec_into_array<U, V, const N: usize>(
&mut self,
iv: T,
message: &Vec<U>,
cipher: &mut [V; N],
) -> u64
fn encrypt_vec_into_array<U, V, const N: usize>( &mut self, iv: T, message: &Vec<U>, cipher: &mut [V; N], ) -> u64
Vec<U> object with the padding defined
according to PKCS #7 in PCBC (Propagation Cipher-Block Chaining) mode, and
stores the encrypted data in array [V; N]. Read moreSource§fn encrypt_array<U, const N: usize>(
&mut self,
iv: T,
message: &[U; N],
cipher: *mut u8,
) -> u64where
U: SmallUInt,
fn encrypt_array<U, const N: usize>(
&mut self,
iv: T,
message: &[U; N],
cipher: *mut u8,
) -> u64where
U: SmallUInt,
[U; N] object with the padding
defined according to PKCS #7 in PCBC (Propagation Cipher-Block Chaining) mode. Read moreSource§fn encrypt_array_into_vec<U, V, const N: usize>(
&mut self,
iv: T,
message: &[U; N],
cipher: &mut Vec<V>,
) -> u64
fn encrypt_array_into_vec<U, V, const N: usize>( &mut self, iv: T, message: &[U; N], cipher: &mut Vec<V>, ) -> u64
[U; N] object with the padding
according to PKCS #7 in PCBC (Propagation Cipher-Block Chaining) mode, and stores the
encrypted data in Vec<V>. Read moreSource§fn encrypt_array_into_array<U, V, const N: usize, const M: usize>(
&mut self,
iv: T,
message: &[U; N],
cipher: &mut [V; M],
) -> u64
fn encrypt_array_into_array<U, V, const N: usize, const M: usize>( &mut self, iv: T, message: &[U; N], cipher: &mut [V; M], ) -> u64
[U; N] object with the padding
according to PKCS #7 in PCBC (Propagation Cipher-Block Chaining) mode, and stores the
encrypted data in array [V; M]. Read moreSource§fn decrypt_into_vec<U>(
&mut self,
iv: T,
cipher: *const u8,
length_in_bytes: u64,
message: &mut Vec<U>,
) -> u64where
U: SmallUInt,
fn decrypt_into_vec<U>(
&mut self,
iv: T,
cipher: *const u8,
length_in_bytes: u64,
message: &mut Vec<U>,
) -> u64where
U: SmallUInt,
Vec<U>. Read moreSource§fn decrypt_into_string(
&mut self,
iv: T,
cipher: *const u8,
length_in_bytes: u64,
message: &mut String,
) -> u64
fn decrypt_into_string( &mut self, iv: T, cipher: *const u8, length_in_bytes: u64, message: &mut String, ) -> u64
String. Read moreSource§fn decrypt_vec<U>(&mut self, iv: T, cipher: &Vec<U>, message: *mut u8) -> u64where
U: SmallUInt,
fn decrypt_vec<U>(&mut self, iv: T, cipher: &Vec<U>, message: *mut u8) -> u64where
U: SmallUInt,
Vec<U> object with the padding defined
according to PKCS #7 in PCBC (Propagation Cipher-Block Chaining) mode. Read moreSource§fn decrypt_vec_into_vec<U, V>(
&mut self,
iv: T,
cipher: &Vec<U>,
message: &mut Vec<V>,
) -> u64
fn decrypt_vec_into_vec<U, V>( &mut self, iv: T, cipher: &Vec<U>, message: &mut Vec<V>, ) -> u64
Vec<U> object with the padding defined
according to PKCS #7 in PCBC (Propagation Cipher-Block Chaining) mode, and
stores the decrypted data in Vec<V>. Read moreSource§fn decrypt_vec_into_array<U, V, const N: usize>(
&mut self,
iv: T,
cipher: &Vec<U>,
message: &mut [V; N],
) -> u64
fn decrypt_vec_into_array<U, V, const N: usize>( &mut self, iv: T, cipher: &Vec<U>, message: &mut [V; N], ) -> u64
Vec<U> object with the padding defined
according to PKCS #7 in PCBC (Propagation Cipher-Block Chaining) mode, and
stores the decrypted data in array [V; N]. Read moreSource§fn decrypt_vec_into_string<U>(
&mut self,
iv: T,
cipher: &Vec<U>,
message: &mut String,
) -> u64where
U: SmallUInt,
fn decrypt_vec_into_string<U>(
&mut self,
iv: T,
cipher: &Vec<U>,
message: &mut String,
) -> u64where
U: SmallUInt,
str with the padding defined according to
PKCS #7 in PCBC (Propagation Cipher-Block Chaining) mode, and stores the
decrypted data in String. Read moreSource§fn decrypt_array<U, const N: usize>(
&mut self,
iv: T,
cipher: &[U; N],
message: *mut u8,
) -> u64where
U: SmallUInt,
fn decrypt_array<U, const N: usize>(
&mut self,
iv: T,
cipher: &[U; N],
message: *mut u8,
) -> u64where
U: SmallUInt,
[U; N] object with the padding
defined according to PKCS #7 in PCBC (Propagation Cipher-Block Chaining) mode. Read moreSource§fn decrypt_array_into_vec<U, V, const N: usize>(
&mut self,
iv: T,
cipher: &[U; N],
message: &mut Vec<V>,
) -> u64
fn decrypt_array_into_vec<U, V, const N: usize>( &mut self, iv: T, cipher: &[U; N], message: &mut Vec<V>, ) -> u64
[U; N] object with the padding
defined according to PKCS #7 in PCBC (Propagation Cipher-Block Chaining) mode,
and stores the decrypted data in Vec<V>. Read moreSource§fn decrypt_array_into_array<U, V, const N: usize, const M: usize>(
&mut self,
iv: T,
cipher: &[U; N],
message: &mut [V; M],
) -> u64
fn decrypt_array_into_array<U, V, const N: usize, const M: usize>( &mut self, iv: T, cipher: &[U; N], message: &mut [V; M], ) -> u64
[U; N] object with the padding
defined according to PKCS #7 in PCBC (Propagation Cipher-Block Chaining) mode,
and stores the decrypted data in array [V; M]. Read moreSource§fn decrypt_array_into_string<U, const N: usize>(
&mut self,
iv: T,
cipher: &[U; N],
message: &mut String,
) -> u64where
U: SmallUInt,
fn decrypt_array_into_string<U, const N: usize>(
&mut self,
iv: T,
cipher: &[U; N],
message: &mut String,
) -> u64where
U: SmallUInt,
[U; N] object with the padding
defined according to PKCS #7 in PCBC (Propagation Cipher-Block Chaining) mode,
and stores the decrypted data in String. Read more