From dacb5f9951064d19ac69c1198985af136f71a6db Mon Sep 17 00:00:00 2001 From: Paul Kehrer Date: Fri, 27 Jun 2014 09:15:07 -0600 Subject: add generate_private_key to DSAParameters + add a new function to dsa dsa.generate_private_key(key_size, backend) will allow you to generate a new DSA key and implicitly generate new parameters. This streamlines the common case and will be an avenue to support future backends that don't allow independent generation of DSAParameters (e.g. CommonCrypto) --- docs/hazmat/primitives/interfaces.rst | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'docs/hazmat/primitives/interfaces.rst') diff --git a/docs/hazmat/primitives/interfaces.rst b/docs/hazmat/primitives/interfaces.rst index 755cef41..ac47c1e1 100644 --- a/docs/hazmat/primitives/interfaces.rst +++ b/docs/hazmat/primitives/interfaces.rst @@ -282,6 +282,17 @@ DSA `DSA`_ parameters. + .. method:: generate_private_key() + + .. versionadded:: 0.5 + + Generate a DSA private key. This method can be used to generate many + new private keys from a single set of parameters. + + :return: A + :class:`~cryptography.hazmat.primitives.interfaces.DSAPrivateKey` + provider. + .. class:: DSAParametersWithNumbers -- cgit v1.2.3