Learn R Programming

paws.security.identity (version 0.1.12)

kms_generate_random: Returns a random byte string that is cryptographically secure

Description

Returns a random byte string that is cryptographically secure.

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.

Required permissions: kms:GenerateRandom (IAM policy)

Usage

kms_generate_random(NumberOfBytes, CustomKeyStoreId)

Value

A list with the following syntax:

list(
  Plaintext = raw
)

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 describe_custom_key_stores operation.

Request syntax

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

Examples

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

Run the code above in your browser using DataLab