Argtypes: uint8_t from C to Python
I'm using ctypes to use a C library in my Python script. I have a function in C library that accepts as argtypes uint8_t and was wondering how to invoke it from Python. This is the C function I'm referring to: void indcpa_keypair(uint8_t pk[KYBER_INDCPA_PUBLICKEYBYTES], uint8_t sk[KYBER_INDCPA_SECRETKEYBYTES]) My Python script where I'm trying to use it is this: def key_generation(): out = CDLL('./PQCgenKAT_kem.so') out.pqcrystals_kyber512_ref_indcpa_keypair.argtypes = #I don't know out.pqcrystals_kyber512_ref_indcpa_keypair.restype = None pk = [] * CRYPTO_PUBLICKEYBITES sk = [] * CRYPTO_SECRE
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.