Challenge 12 decrypt first block.

This commit is contained in:
2022-06-16 07:47:13 -04:00
parent e64cee1e2e
commit f9ddf4cccd
2 changed files with 70 additions and 12 deletions

View File

@@ -16,6 +16,10 @@ impl Bytes {
String::from(std::str::from_utf8(&v).unwrap())
}
pub fn first_block(&self, length: usize) -> Bytes {
Bytes(self.0[0..length].to_vec())
}
pub fn random(length: usize) -> Bytes {
Bytes(
(0..length)