random.h (879c26fb9fd950eefcac64cc854b22edc05e317a) | random.h (cb8d4c8f54b8271f642f02382eec29d468bb1c77) |
---|---|
1/* 2 * QEMU Crypto random number provider 3 * 4 * Copyright (c) 2015-2016 Red Hat, Inc. 5 * 6 * This library is free software; you can redistribute it and/or 7 * modify it under the terms of the GNU Lesser General Public 8 * License as published by the Free Software Foundation; either --- 20 unchanged lines hidden (view full) --- 29 * qcrypto_random_bytes: 30 * @buf: the buffer to fill 31 * @buflen: length of @buf in bytes 32 * @errp: pointer to a NULL-initialized error object 33 * 34 * Fill @buf with @buflen bytes of cryptographically strong 35 * random data 36 * | 1/* 2 * QEMU Crypto random number provider 3 * 4 * Copyright (c) 2015-2016 Red Hat, Inc. 5 * 6 * This library is free software; you can redistribute it and/or 7 * modify it under the terms of the GNU Lesser General Public 8 * License as published by the Free Software Foundation; either --- 20 unchanged lines hidden (view full) --- 29 * qcrypto_random_bytes: 30 * @buf: the buffer to fill 31 * @buflen: length of @buf in bytes 32 * @errp: pointer to a NULL-initialized error object 33 * 34 * Fill @buf with @buflen bytes of cryptographically strong 35 * random data 36 * |
37 * Returns 0 on sucess, -1 on error | 37 * Returns 0 on success, -1 on error |
38 */ 39int qcrypto_random_bytes(uint8_t *buf, 40 size_t buflen, 41 Error **errp); 42 43 44#endif /* QCRYPTO_RANDOM_H__ */ | 38 */ 39int qcrypto_random_bytes(uint8_t *buf, 40 size_t buflen, 41 Error **errp); 42 43 44#endif /* QCRYPTO_RANDOM_H__ */ |