KeyShape¶
- class oci.key_management.models.KeyShape(**kwargs)¶
Bases:
objectThe cryptographic properties of a key.
Attributes:
A constant which can be used with the algorithm property of a KeyShape.
A constant which can be used with the algorithm property of a KeyShape.
A constant which can be used with the algorithm property of a KeyShape.
A constant which can be used with the curve_id property of a KeyShape.
A constant which can be used with the curve_id property of a KeyShape.
A constant which can be used with the curve_id property of a KeyShape.
[Required] Gets the algorithm of this KeyShape.
Gets the curve_id of this KeyShape.
[Required] Gets the length of this KeyShape. The length of the key in bytes, expressed as an integer. Supported values include the following: - AES: 16, 24, or 32 - RSA: 256, 384, or 512 - ECDSA: 32, 48, or 66.
Methods:
__init__(**kwargs)Initializes a new KeyShape object with values from keyword arguments.
- ALGORITHM_AES = 'AES'¶
A constant which can be used with the algorithm property of a KeyShape. This constant has a value of “AES”
- ALGORITHM_ECDSA = 'ECDSA'¶
A constant which can be used with the algorithm property of a KeyShape. This constant has a value of “ECDSA”
- ALGORITHM_RSA = 'RSA'¶
A constant which can be used with the algorithm property of a KeyShape. This constant has a value of “RSA”
- CURVE_ID_NIST_P256 = 'NIST_P256'¶
A constant which can be used with the curve_id property of a KeyShape. This constant has a value of “NIST_P256”
- CURVE_ID_NIST_P384 = 'NIST_P384'¶
A constant which can be used with the curve_id property of a KeyShape. This constant has a value of “NIST_P384”
- CURVE_ID_NIST_P521 = 'NIST_P521'¶
A constant which can be used with the curve_id property of a KeyShape. This constant has a value of “NIST_P521”
- __init__(**kwargs)¶
Initializes a new KeyShape object with values from keyword arguments. The following keyword arguments are supported (corresponding to the getters/setters of this class):
- Parameters
algorithm (str) – The value to assign to the algorithm property of this KeyShape. Allowed values for this property are: “AES”, “RSA”, “ECDSA”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.
length (int) – The value to assign to the length property of this KeyShape.
curve_id (str) – The value to assign to the curve_id property of this KeyShape. Allowed values for this property are: “NIST_P256”, “NIST_P384”, “NIST_P521”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.
- property algorithm¶
[Required] Gets the algorithm of this KeyShape. The algorithm used by a key’s key versions to encrypt or decrypt. Only AES algorithm is supported for External keys.
Allowed values for this property are: “AES”, “RSA”, “ECDSA”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.
- Returns
The algorithm of this KeyShape.
- Return type
str
- property curve_id¶
Gets the curve_id of this KeyShape. Supported curve IDs for ECDSA keys.
Allowed values for this property are: “NIST_P256”, “NIST_P384”, “NIST_P521”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.
- Returns
The curve_id of this KeyShape.
- Return type
str
- property length¶
[Required] Gets the length of this KeyShape. The length of the key in bytes, expressed as an integer. Supported values include the following:
AES: 16, 24, or 32
RSA: 256, 384, or 512
ECDSA: 32, 48, or 66
- Returns
The length of this KeyShape.
- Return type
int