Skip to content

Commit

Permalink
AlgorithmIdentifier: cross-reference to alg_id module
Browse files Browse the repository at this point in the history
  • Loading branch information
ctz committed Dec 23, 2024
1 parent 6805379 commit c5cb7ef
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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]);

Expand Down

0 comments on commit c5cb7ef

Please sign in to comment.