-static bool prf_xor(int nid, const char *secret, size_t secretlen, char *seed, size_t seedlen, char *out, ssize_t outlen) {
- digest_t digest;
-
- if(!digest_open_by_nid(&digest, nid, -1))
+static bool prf_xor(int nid, const uint8_t *secret, size_t secretlen, uint8_t *seed, size_t seedlen, uint8_t *out, size_t outlen) {
+ digest_t *digest = digest_open_by_nid(nid, DIGEST_ALGO_SIZE);
+
+ if(!digest) {