Challenge 12 decrypt first block.
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user