ovunto_security/primitives/algorithm.rs
1use std::fmt::{self, Debug, Display, Formatter};
2
3use serde::{Deserialize, Serialize};
4
5#[derive(Debug, Clone, Copy, Serialize, Deserialize)]
6pub enum Algorithm {
7 Sha1,
8 Sha256,
9 Sha512,
10}
11
12impl Default for Algorithm {
13 fn default() -> Self {
14 Self::Sha1
15 }
16}
17
18impl Display for Algorithm {
19 fn fmt(&self, f: &mut Formatter) -> fmt::Result {
20 Debug::fmt(self, f)
21 }
22}