bash_prg_hash/
variants.rs1use crate::BashPrgHash;
2use digest::{
3 CollisionResistance,
4 consts::{U16, U24, U32},
5};
6
7pub type BashPrgHash1281 = BashPrgHash<160, 1>;
9pub type BashPrgHash1282 = BashPrgHash<128, 2>;
11pub type BashPrgHash1921 = BashPrgHash<144, 1>;
13pub type BashPrgHash1922 = BashPrgHash<96, 2>;
15pub type BashPrgHash2561 = BashPrgHash<128, 1>;
17pub type BashPrgHash2562 = BashPrgHash<64, 2>;
19
20impl CollisionResistance for BashPrgHash1281 {
21 type CollisionResistance = U16;
22}
23impl CollisionResistance for BashPrgHash1282 {
24 type CollisionResistance = U16;
25}
26impl CollisionResistance for BashPrgHash1921 {
27 type CollisionResistance = U24;
28}
29impl CollisionResistance for BashPrgHash1922 {
30 type CollisionResistance = U24;
31}
32impl CollisionResistance for BashPrgHash2561 {
33 type CollisionResistance = U32;
34}
35impl CollisionResistance for BashPrgHash2562 {
36 type CollisionResistance = U32;
37}
38
39#[cfg(feature = "oid")]
40mod oids {
41 use digest::const_oid::{AssociatedOid, ObjectIdentifier};
42
43 impl AssociatedOid for super::BashPrgHash1281 {
44 const OID: ObjectIdentifier = ObjectIdentifier::new_unwrap("1.2.112.0.2.0.34.101.77.21");
45 }
46
47 impl AssociatedOid for super::BashPrgHash1282 {
48 const OID: ObjectIdentifier = ObjectIdentifier::new_unwrap("1.2.112.0.2.0.34.101.77.22");
49 }
50
51 impl AssociatedOid for super::BashPrgHash1921 {
52 const OID: ObjectIdentifier = ObjectIdentifier::new_unwrap("1.2.112.0.2.0.34.101.77.23");
53 }
54
55 impl AssociatedOid for super::BashPrgHash1922 {
56 const OID: ObjectIdentifier = ObjectIdentifier::new_unwrap("1.2.112.0.2.0.34.101.77.24");
57 }
58
59 impl AssociatedOid for super::BashPrgHash2561 {
60 const OID: ObjectIdentifier = ObjectIdentifier::new_unwrap("1.2.112.0.2.0.34.101.77.25");
61 }
62
63 impl AssociatedOid for super::BashPrgHash2562 {
64 const OID: ObjectIdentifier = ObjectIdentifier::new_unwrap("1.2.112.0.2.0.34.101.77.26");
65 }
66}