Esempio n. 1
0
def crypto_sign_ed25519ph_update(edph, pmsg):
    """
    Update the hash state wrapped in edph

    :param edph: the ed25519ph state being updated
    :type edph: crypto_sign_ed25519ph_state
    :param pmsg: the partial message
    :type pmsg: bytes
    :rtype: None
    """
    ensure(isinstance(edph, crypto_sign_ed25519ph_state),
           'edph parameter must be a ed25519ph_state object',
           raising=exc.TypeError)
    ensure(isinstance(pmsg, bytes),
           'pmsg parameter must be a bytes object',
           raising=exc.TypeError)
    rc = lib.crypto_sign_ed25519ph_update(edph.state, pmsg, len(pmsg))
    ensure(rc == 0, 'Unexpected library error', raising=exc.RuntimeError)
Esempio n. 2
0
def crypto_sign_ed25519ph_update(edph, pmsg):
    """
    Update the hash state wrapped in edph

    :param edph: the ed25519ph state being updated
    :type edph: crypto_sign_ed25519ph_state
    :param pmsg: the partial message
    :type pmsg: bytes
    :rtype: None
    """
    ensure(isinstance(edph, crypto_sign_ed25519ph_state),
           'edph parameter must be a ed25519ph_state object',
           raising=exc.TypeError)
    ensure(isinstance(pmsg, bytes),
           'pmsg parameter must be a bytes object',
           raising=exc.TypeError)
    rc = lib.crypto_sign_ed25519ph_update(edph.state,
                                          pmsg,
                                          len(pmsg))
    ensure(rc == 0,
           'Unexpected library error',
           raising=exc.RuntimeError)