Skip to content

Commit 72b69b6

Browse files
committed
Renamed KeyType from BytesLowEntropy / BytesFullEntropy to Unknown / CryptographicRandom to better convey the intention.
1 parent 05f620d commit 72b69b6

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

crypto/core/src/key_material.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,9 @@ pub enum KeyType {
242242
///
243243
/// This is the default KeyType for data loaded via [KeyMaterial::from_bytes].
244244
/// Promotion from Unknown to any other key type is considered to be a hazardous operation
245-
/// and must be done within a [key_material::do_hazardous_operations] closure.
245+
/// and must be done within a [do_hazardous_operations] closure.
246+
/// If you want to import key material directly into a known key type, use [KeyMaterial::from_bytes_as_type],
247+
/// which does not require a hazardous operations closure.
246248
Unknown,
247249

248250
/// The KeyMaterial contains data of full entropy and can be safely converted to any other key type.

0 commit comments

Comments
 (0)