diff --git a/src/lib.rs b/src/lib.rs index 335e0e9..358abd8 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -915,7 +915,8 @@ pub struct InvalidSignature; /// The outer sequence encoding is *not included*, so this is the DER encoding /// of an OID for `algorithm` plus the `parameters` value. /// -/// For example, this is the `rsaEncryption` algorithm: +/// For example, this is the `rsaEncryption` algorithm (but prefer to use the constant +/// [`alg_id::RSA_ENCRYPTION`] instead): /// /// ``` /// let rsa_encryption = rustls_pki_types::AlgorithmIdentifier::from_slice( @@ -926,7 +927,10 @@ pub struct InvalidSignature; /// 0x05, 0x00 /// ] /// ); +/// assert_eq!(rustls_pki_types::alg_id::RSA_ENCRYPTION, rsa_encryption); /// ``` +/// +/// Common values for this type are provided in the [`alg_id`] module. #[derive(Clone, Copy, PartialEq, Eq)] pub struct AlgorithmIdentifier(&'static [u8]);