ecaps2: Add a TODO about changing algo into an enum.
This commit is contained in:
parent
3209b04a50
commit
79c691e1c0
1 changed files with 2 additions and 1 deletions
|
@ -81,8 +81,9 @@ pub fn convert_element(root: &Element) -> Result<Vec<u8>, Error> {
|
||||||
Ok(final_string)
|
Ok(final_string)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: make algo into an enum.
|
||||||
pub fn hash_ecaps2(data: &[u8], algo: &str) -> String {
|
pub fn hash_ecaps2(data: &[u8], algo: &str) -> String {
|
||||||
match algo.as_ref() {
|
match algo {
|
||||||
"sha-256" => {
|
"sha-256" => {
|
||||||
let mut hasher = Sha256::default();
|
let mut hasher = Sha256::default();
|
||||||
hasher.input(data);
|
hasher.input(data);
|
||||||
|
|
Loading…
Reference in a new issue