Generates a cryptographic key pair. Returns: :class:`~bigchaindb.common.crypto.CryptoKeypair`: A :obj:`collections.namedtuple` with named fields :attr:`~bigchaindb.common.crypto.CryptoKeypair.private_key` and :attr:`~bigchaindb.common.crypto.CryptoKeypair.public_
()
| 23 | |
| 24 | |
| 25 | def generate_key_pair(): |
| 26 | """Generates a cryptographic key pair. |
| 27 | |
| 28 | Returns: |
| 29 | :class:`~bigchaindb.common.crypto.CryptoKeypair`: A |
| 30 | :obj:`collections.namedtuple` with named fields |
| 31 | :attr:`~bigchaindb.common.crypto.CryptoKeypair.private_key` and |
| 32 | :attr:`~bigchaindb.common.crypto.CryptoKeypair.public_key`. |
| 33 | |
| 34 | """ |
| 35 | # TODO FOR CC: Adjust interface so that this function becomes unnecessary |
| 36 | return CryptoKeypair( |
| 37 | *(k.decode() for k in crypto.ed25519_generate_key_pair())) |
| 38 | |
| 39 | |
| 40 | PrivateKey = crypto.Ed25519SigningKey |
no outgoing calls