I'm writing some Erlang code that basically accepts some binary data from a TCP connection and then uses a C nif to decrypt the data and return the decrypted data.
The problem is that I can't seem to figure out how to modify the passed in binary.
This is the function I'm using. If anyone can point me in the right direction, I would appreciate it.
static ERL_NIF_TERM decrypt(ErlNifEnv* env, ErlNifBinary *data);
Thanks!