def crypto_box_open_afternm(c, nonce, k):
_assert_min_len('c', c, crypto_box_MACBYTES)
_assert_len('nonce', nonce, crypto_box_NONCEBYTES)
_assert_len('k', k, crypto_box_BEFORENMBYTES)
msg = bytearray(len(c) - crypto_box_MACBYTES)
_raise_on_error(
lib.crypto_box_open_easy_afternm(
ffi.cast("unsigned char *", ffi.from_buffer(msg)),
c,
len(c),
nonce,
k,
),
)
return binary_type(msg)
评论列表
文章目录