MCPcopy
hub / github.com/bigchaindb/bigchaindb / generate_key_pair

Function generate_key_pair

bigchaindb/common/crypto.py:25–37  ·  view source on GitHub ↗

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_

()

Source from the content-addressed store, hash-verified

23
24
25def 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
40PrivateKey = crypto.Ed25519SigningKey

Callers 15

generate_blockFunction · 0.90
aliceFunction · 0.90
bobFunction · 0.90
carolFunction · 0.90
merlinFunction · 0.90
test_validation_errorFunction · 0.90

Calls

no outgoing calls

Tested by 15

aliceFunction · 0.72
bobFunction · 0.72
carolFunction · 0.72
merlinFunction · 0.72
test_validation_errorFunction · 0.72