Sha256: f77d1b4a7640c736b1a07950d3af42d505803d4902399417251960e79710cad9

Contents?: true

Size: 1.04 KB

Versions: 8

Compression:

Stored size: 1.04 KB

Contents

#ifndef AWS_COMMON_DEVICE_RANDOM_H
#define AWS_COMMON_DEVICE_RANDOM_H
/**
 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
 * SPDX-License-Identifier: Apache-2.0.
 */
#include <aws/common/common.h>

struct aws_byte_buf;

AWS_EXTERN_C_BEGIN

/**
 * Get an unpredictably random 64bit number, suitable for cryptographic use.
 */
AWS_COMMON_API int aws_device_random_u64(uint64_t *output);

/**
 * Get an unpredictably random 32bit number, suitable for cryptographic use.
 */
AWS_COMMON_API int aws_device_random_u32(uint32_t *output);

/**
 * Get an unpredictably random 16bit number, suitable for cryptographic use.
 */
AWS_COMMON_API int aws_device_random_u16(uint16_t *output);

/**
 * Get an unpredictably random 8bit number, suitable for cryptographic use.
 */
AWS_COMMON_API int aws_device_random_u8(uint8_t *output);

/**
 * Fill a buffer with unpredictably random bytes, suitable for cryptographic use.
 */
AWS_COMMON_API int aws_device_random_buffer(struct aws_byte_buf *output);

AWS_EXTERN_C_END

#endif /* AWS_COMMON_DEVICE_RANDOM_H */

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
aws-crt-0.1.8 aws-crt-ffi/crt/aws-c-common/include/aws/common/device_random.h
aws-crt-0.1.7 aws-crt-ffi/crt/aws-c-common/include/aws/common/device_random.h
aws-crt-0.1.6 aws-crt-ffi/crt/aws-c-common/include/aws/common/device_random.h
aws-crt-0.1.5 aws-crt-ffi/crt/aws-c-common/include/aws/common/device_random.h
aws-crt-0.1.4 aws-crt-ffi/crt/aws-c-common/include/aws/common/device_random.h
aws-crt-0.1.2 aws-crt-ffi/crt/aws-c-common/include/aws/common/device_random.h
aws-crt-0.1.1.pre native/crt/aws-c-common/include/aws/common/device_random.h
aws-crt-0.1.0.pre native/crt/aws-c-common/include/aws/common/device_random.h