How to use the cryptoconditions.crypto.ed25519_generate_key_pair function in cryptoconditions

To help you get started, we’ve selected a few cryptoconditions examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github bigchaindb / bigchaindb-driver / bigchaindb_driver / crypto.py View on Github external
def generate_keypair(seed=None):
    """Generates a cryptographic key pair.

    Args:
        seed (bytes): 32-byte seed for deterministic generation.
                      Defaults to `None`.
    Returns:
        :class:`~bigchaindb_driver.crypto.CryptoKeypair`: A
        :obj:`collections.namedtuple` with named fields
        :attr:`~bigchaindb_driver.crypto.CryptoKeypair.private_key` and
        :attr:`~bigchaindb_driver.crypto.CryptoKeypair.public_key`.

    """
    return CryptoKeypair(
        *(k.decode() for k in crypto.ed25519_generate_key_pair(seed)))
github bigchaindb / bigchaindb / bigchaindb / common / crypto.py View on Github external
def generate_key_pair():
    """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_key`.

    """
    # TODO FOR CC: Adjust interface so that this function becomes unnecessary
    return CryptoKeypair(
        *(k.decode() for k in crypto.ed25519_generate_key_pair()))
github bigchaindb / bigchaindb-driver / bigchaindb_driver / common / crypto.py View on Github external
def generate_key_pair():
    """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_key`.

    """
    # TODO FOR CC: Adjust interface so that this function becomes unnecessary
    return CryptoKeypair(
        *(k.decode() for k in crypto.ed25519_generate_key_pair()))