-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The core and stream operations are moved into separate modules (#27)
- Loading branch information
Showing
29 changed files
with
1,275 additions
and
1,226 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
/// Passing cipher keys in a polymorphic way | ||
pub enum CipherKey { | ||
ArrayU8([u8; 32]), | ||
ArrayU32([u32; 8]), | ||
} | ||
|
||
impl From<[u8; 32]> for CipherKey { | ||
/// builds key from '[u8;32]' array | ||
fn from(array_u8: [u8; 32]) -> Self { | ||
Self::ArrayU8(array_u8) | ||
} | ||
} | ||
|
||
impl From<[u32; 8]> for CipherKey { | ||
/// builds key from '[u32;8]' array | ||
fn from(array_u32: [u32; 8]) -> Self { | ||
Self::ArrayU32(array_u32) | ||
} | ||
} |
Oops, something went wrong.