CreateRsaKeyOptions Class

public class CreateRsaKeyOptions
extends CreateKeyOptions

Represents the configurable options to create an RSA key.

Constructor Summary

Constructor Description
CreateRsaKeyOptions(String name)

Creates a CreateRsaKeyOptions with name as name of the RSA key.

Method Summary

Modifier and Type Method and Description
Integer getKeySize()

Get the key size in bits.

Integer getPublicExponent()

Get the public exponent for the key.

Boolean isHardwareProtected()

Get the HSM value of the key being created.

CreateRsaKeyOptions setEnabled(Boolean enabled)

Set a value that indicates if the key is enabled.

CreateRsaKeyOptions setExpiresOn(OffsetDateTime expiresOn)

Set the expires UTC time.

CreateRsaKeyOptions setExportable(Boolean exportable)

Set a flag that indicates if the private key can be exported.

CreateRsaKeyOptions setHardwareProtected(Boolean hardwareProtected)

Set whether the key being created is of HSM type or not.

CreateRsaKeyOptions setKeyOperations(KeyOperation[] keyOperations)

Set the key operations.

CreateRsaKeyOptions setKeySize(Integer keySize)

Set the key size in bits.

CreateRsaKeyOptions setNotBefore(OffsetDateTime notBefore)

Set the notBefore UTC time.

CreateRsaKeyOptions setPublicExponent(Integer publicExponent)

Set the public exponent for the key.

CreateRsaKeyOptions setReleasePolicy(KeyReleasePolicy releasePolicy)

Set the policy rules under which the key can be exported.

CreateRsaKeyOptions setTags(Map<String,String> tags)

Set the tags to be associated with the key.

Methods inherited from CreateKeyOptions

Methods inherited from java.lang.Object

Constructor Details

CreateRsaKeyOptions

public CreateRsaKeyOptions(String name)

Creates a CreateRsaKeyOptions with name as name of the RSA key.

Parameters:

name - The name of the key.

Method Details

getKeySize

public Integer getKeySize()

Get the key size in bits.

Returns:

The key size in bits.

getPublicExponent

public Integer getPublicExponent()

Get the public exponent for the key.

Returns:

The public exponent.

isHardwareProtected

public Boolean isHardwareProtected()

Get the HSM value of the key being created.

Returns:

The HSM value.

setEnabled

public CreateRsaKeyOptions setEnabled(Boolean enabled)

Set a value that indicates if the key is enabled.

Overrides:

CreateRsaKeyOptions.setEnabled(Boolean enabled)

Parameters:

enabled - The enabled value to set.

Returns:

The updated CreateRsaKeyOptions object.

setExpiresOn

public CreateRsaKeyOptions setExpiresOn(OffsetDateTime expiresOn)

Set the expires UTC time.

Overrides:

CreateRsaKeyOptions.setExpiresOn(OffsetDateTime expiresOn)

Parameters:

expiresOn - The expiry time to set for the key.

Returns:

The updated CreateRsaKeyOptions object.

setExportable

public CreateRsaKeyOptions setExportable(Boolean exportable)

Set a flag that indicates if the private key can be exported.

Overrides:

CreateRsaKeyOptions.setExportable(Boolean exportable)

Parameters:

exportable - A flag that indicates if the private key can be exported.

Returns:

The updated CreateRsaKeyOptions object.

setHardwareProtected

public CreateRsaKeyOptions setHardwareProtected(Boolean hardwareProtected)

Set whether the key being created is of HSM type or not.

Parameters:

hardwareProtected - The HSM value to set.

Returns:

The updated CreateRsaKeyOptions object.

setKeyOperations

public CreateRsaKeyOptions setKeyOperations(KeyOperation[] keyOperations)

Set the key operations.

Overrides:

CreateRsaKeyOptions.setKeyOperations(KeyOperation[] keyOperations)

Parameters:

keyOperations - The key operations to set.

Returns:

The updated CreateRsaKeyOptions object.

setKeySize

public CreateRsaKeyOptions setKeySize(Integer keySize)

Set the key size in bits.

Parameters:

keySize - The key size in bits to set.

Returns:

The updated CreateRsaKeyOptions object.

setNotBefore

public CreateRsaKeyOptions setNotBefore(OffsetDateTime notBefore)

Set the notBefore UTC time.

Overrides:

CreateRsaKeyOptions.setNotBefore(OffsetDateTime notBefore)

Parameters:

notBefore - The notBefore UTC time to set.

Returns:

The updated CreateRsaKeyOptions object.

setPublicExponent

public CreateRsaKeyOptions setPublicExponent(Integer publicExponent)

Set the public exponent for the key.

Parameters:

publicExponent - The public exponent to set.

Returns:

The updated CreateRsaKeyOptions object.

setReleasePolicy

public CreateRsaKeyOptions setReleasePolicy(KeyReleasePolicy releasePolicy)

Set the policy rules under which the key can be exported.

Overrides:

CreateRsaKeyOptions.setReleasePolicy(KeyReleasePolicy releasePolicy)

Parameters:

releasePolicy - The policy rules to set.

Returns:

The updated CreateRsaKeyOptions object.

setTags

public CreateRsaKeyOptions setTags(Map tags)

Set the tags to be associated with the key.

Overrides:

CreateRsaKeyOptions.setTags(Map<String,String> tags)

Parameters:

tags - The tags to set.

Returns:

The updated CreateRsaKeyOptions object.

Applies to