Learn R Programming

paws.security.identity (version 0.1.0)

kms_generate_random: Returns a random byte string that is cryptographically secure

Description

Returns a random byte string that is cryptographically secure.

Usage

kms_generate_random(NumberOfBytes, CustomKeyStoreId)

Arguments

NumberOfBytes

The length of the byte string.

CustomKeyStoreId

Generates the random byte string in the AWS CloudHSM cluster that is associated with the specified custom key store. To find the ID of a custom key store, use the DescribeCustomKeyStores operation.

Request syntax

svc$generate_random(
  NumberOfBytes = 123,
  CustomKeyStoreId = "string"
)

Details

By default, the random byte string is generated in AWS KMS. To generate the byte string in the AWS CloudHSM cluster that is associated with a custom key store, specify the custom key store ID.

For more information about entropy and random number generation, see the AWS Key Management Service Cryptographic Details whitepaper.

Examples

Run this code
# NOT RUN {
# The following example uses AWS KMS to generate 32 bytes of random data.
# }
# NOT RUN {
svc$generate_random(
  NumberOfBytes = 32L
)
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab