Skip to content

Commit

Permalink
Fixed example code in weak_cryptographic_key.rs (#9774)
Browse files Browse the repository at this point in the history
The proper way to use these APIs is to instantiate the curve classes
  • Loading branch information
alex authored Feb 2, 2024
1 parent 92d99a7 commit 467c091
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ use crate::checkers::ast::Checker;
/// from cryptography.hazmat.primitives.asymmetric import dsa, ec
///
/// dsa.generate_private_key(key_size=512)
/// ec.generate_private_key(curve=ec.SECT163K1)
/// ec.generate_private_key(curve=ec.SECT163K1())
/// ```
///
/// Use instead:
/// ```python
/// from cryptography.hazmat.primitives.asymmetric import dsa, ec
///
/// dsa.generate_private_key(key_size=4096)
/// ec.generate_private_key(curve=ec.SECP384R1)
/// ec.generate_private_key(curve=ec.SECP384R1())
/// ```
///
/// ## References
Expand Down

0 comments on commit 467c091

Please sign in to comment.