def crypto_sign(message, sk):
    """
    Signs the message ``message`` using the secret key ``sk`` and returns the
    signed message.

    :param message: bytes
    :param sk: bytes
    :rtype: bytes
    """
    signed = ffi.new("unsigned char[]", len(message) + crypto_sign_BYTES)
    signed_len = ffi.new("unsigned long long *")

    rc = lib.crypto_sign(signed, signed_len, message, len(message), sk)
    ensure(rc == 0,
           'Unexpected library error',
           raising=exc.RuntimeError)

    return ffi.buffer(signed, signed_len[0])[:]
def crypto_sign ( message , sk ) : signed = ffi . new ( "unsigned char[]" , len ( message ) + crypto_sign_BYTES ) signed_len = ffi . new ( "unsigned long long *" ) rc = lib . crypto_sign ( signed , signed_len , message , len ( message ) , sk ) ensure ( rc == 0 , 'Unexpected library error' , raising = exc . RuntimeError ) return ffi . buffer ( signed , signed_len [ 0 ] ) [ : ]
Signs the message ``message`` using the secret key ``sk`` and returns the
    signed message.

    :param message: bytes
    :param sk: bytes
    :rtype: bytes