Lines Matching refs:buflen
214 static ssize_t sysctl_random(char *buf, size_t buflen) in sysctl_random() argument
232 if (!ossl_assert(buflen % sizeof(long) == 0)) { in sysctl_random()
254 len = buflen > 256 ? 256 : buflen; in sysctl_random()
259 buflen -= len; in sysctl_random()
260 } while (buflen > 0); in sysctl_random()
326 static ssize_t syscall_random(void *buf, size_t buflen) in syscall_random() argument
356 if (getentropy(buf, buflen) == 0) in syscall_random()
357 return (ssize_t)buflen; in syscall_random()
363 if (CCRandomGenerateBytes(buf, buflen) == kCCSuccess) in syscall_random()
364 return (ssize_t)buflen; in syscall_random()
381 return p_getentropy.f(buf, buflen) == 0 ? (ssize_t)buflen : -1; in syscall_random()
387 return syscall(__NR_getrandom, buf, buflen, 0); in syscall_random()
389 return sysctl_random(buf, buflen); in syscall_random()
392 return getrandom(buf, buflen, 0); in syscall_random()
394 if (getentropy(buf, buflen) == 0) in syscall_random()
395 return (ssize_t)buflen; in syscall_random()