Skip to content

Commit d3b5d8b

Browse files
committed
gost94: fix oid
1 parent 7c26608 commit d3b5d8b

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

gost94/src/lib.rs

+6-2
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,14 @@ pub use digest::{self, Digest};
1313
use core::fmt;
1414
use digest::{
1515
FixedOutput, FixedOutputReset, HashMarker, Output, OutputSizeUser, Reset, Update,
16-
const_oid::{AssociatedOid, ObjectIdentifier},
1716
consts::U129,
1817
core_api::{AlgorithmName, BlockSizeUser, CoreWrapper},
1918
crypto_common::hazmat::{DeserializeStateError, SerializableState, SerializedState},
2019
};
2120

21+
#[cfg(feature = "oid")]
22+
use digest::const_oid::{AssociatedOid, ObjectIdentifier};
23+
2224
mod gost94_core;
2325
/// GOST94 parameters.
2426
pub mod params;
@@ -120,11 +122,13 @@ impl<P: Gost94Params> SerializableState for Gost94<P> {
120122
}
121123
}
122124

123-
// From RFC 4490
125+
#[cfg(feature = "oid")]
124126
impl AssociatedOid for Gost94CryptoPro {
127+
// From RFC 4490
125128
const OID: ObjectIdentifier = ObjectIdentifier::new_unwrap("1.2.643.2.2.9");
126129
}
127130

131+
#[cfg(feature = "oid")]
128132
impl AssociatedOid for Gost94UA {
129133
const OID: ObjectIdentifier = ObjectIdentifier::new_unwrap("1.2.804.2.1.1.1.1.2.1");
130134
}

0 commit comments

Comments
 (0)