class Amazonite::Kms::GetPublicKeyResponse

Included Modules

Defined in:

kms/get_public_key_response.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(pull : JSON::PullParser) #

[View source]
def self.new(key_id : String | Nil = nil, public_key : Bytes | Nil = nil, customer_master_key_spec : CustomerMasterKeySpec | Nil = nil, key_spec : KeySpec | Nil = nil, key_usage : KeyUsageType | Nil = nil, encryption_algorithms : Array(EncryptionAlgorithmSpec) | Nil = nil, signing_algorithms : Array(SigningAlgorithmSpec) | Nil = nil, key_agreement_algorithms : Array(KeyAgreementAlgorithmSpec) | Nil = nil) #

[View source]

Instance Method Detail

def ==(other : self) #
Description copied from class Reference

Returns true if this reference is the same as other. Invokes same?.


def customer_master_key_spec : CustomerMasterKeySpec | Nil #

Instead, use the KeySpec field in the GetPublicKey response.

The KeySpec and CustomerMasterKeySpec fields have the same value. We recommend that you use the KeySpec field in your code. However, to avoid breaking changes, KMS supports both fields.


[View source]
def customer_master_key_spec=(customer_master_key_spec : CustomerMasterKeySpec | Nil) #

Instead, use the KeySpec field in the GetPublicKey response.

The KeySpec and CustomerMasterKeySpec fields have the same value. We recommend that you use the KeySpec field in your code. However, to avoid breaking changes, KMS supports both fields.


[View source]
def encryption_algorithms : Array(EncryptionAlgorithmSpec) | Nil #

The encryption algorithms that KMS supports for this key.

This information is critical. If a public key encrypts data outside of KMS by using an unsupported encryption algorithm, the ciphertext cannot be decrypted.

This field appears in the response only when the KeyUsage of the public key is ENCRYPT_DECRYPT.


[View source]
def encryption_algorithms=(encryption_algorithms : Array(EncryptionAlgorithmSpec) | Nil) #

The encryption algorithms that KMS supports for this key.

This information is critical. If a public key encrypts data outside of KMS by using an unsupported encryption algorithm, the ciphertext cannot be decrypted.

This field appears in the response only when the KeyUsage of the public key is ENCRYPT_DECRYPT.


[View source]
def hash(hasher) #
Description copied from class Reference

See Object#hash(hasher)


def key_agreement_algorithms : Array(KeyAgreementAlgorithmSpec) | Nil #

The key agreement algorithm used to derive a shared secret. This field is present only when the KMS key has a KeyUsage value of KEY_AGREEMENT.


[View source]
def key_agreement_algorithms=(key_agreement_algorithms : Array(KeyAgreementAlgorithmSpec) | Nil) #

The key agreement algorithm used to derive a shared secret. This field is present only when the KMS key has a KeyUsage value of KEY_AGREEMENT.


[View source]
def key_id : String | Nil #

The Amazon Resource Name (key ARN) of the asymmetric KMS key from which the public key was downloaded.


[View source]
def key_id=(key_id : String | Nil) #

The Amazon Resource Name (key ARN) of the asymmetric KMS key from which the public key was downloaded.


[View source]
def key_spec : KeySpec | Nil #

The type of the of the public key that was downloaded.


[View source]
def key_spec=(key_spec : KeySpec | Nil) #

The type of the of the public key that was downloaded.


[View source]
def key_usage : KeyUsageType | Nil #

The permitted use of the public key. Valid values for asymmetric key pairs are ENCRYPT_DECRYPT, SIGN_VERIFY, and KEY_AGREEMENT.

This information is critical. For example, if a public key with SIGN_VERIFY key usage encrypts data outside of KMS, the ciphertext cannot be decrypted.


[View source]
def key_usage=(key_usage : KeyUsageType | Nil) #

The permitted use of the public key. Valid values for asymmetric key pairs are ENCRYPT_DECRYPT, SIGN_VERIFY, and KEY_AGREEMENT.

This information is critical. For example, if a public key with SIGN_VERIFY key usage encrypts data outside of KMS, the ciphertext cannot be decrypted.


[View source]
def public_key : Bytes | Nil #

The exported public key.

The value is a DER-encoded X.509 public key, also known as SubjectPublicKeyInfo (SPKI), as defined in RFC 5280. When you use the HTTP API or the Amazon Web Services CLI, the value is Base64-encoded. Otherwise, it is not Base64-encoded.


[View source]
def public_key=(public_key : Bytes | Nil) #

The exported public key.

The value is a DER-encoded X.509 public key, also known as SubjectPublicKeyInfo (SPKI), as defined in RFC 5280. When you use the HTTP API or the Amazon Web Services CLI, the value is Base64-encoded. Otherwise, it is not Base64-encoded.


[View source]
def signing_algorithms : Array(SigningAlgorithmSpec) | Nil #

The signing algorithms that KMS supports for this key.

This field appears in the response only when the KeyUsage of the public key is SIGN_VERIFY.


[View source]
def signing_algorithms=(signing_algorithms : Array(SigningAlgorithmSpec) | Nil) #

The signing algorithms that KMS supports for this key.

This field appears in the response only when the KeyUsage of the public key is SIGN_VERIFY.


[View source]
def validate! : Nil #

[View source]