KeyShape¶
-
class
oci.key_management.models.
KeyShape
(**kwargs)¶ Bases:
object
The cryptographic properties of a key.
Attributes
ALGORITHM_AES
A constant which can be used with the algorithm property of a KeyShape. ALGORITHM_ECDSA
A constant which can be used with the algorithm property of a KeyShape. ALGORITHM_RSA
A constant which can be used with the algorithm property of a KeyShape. CURVE_ID_NIST_P256
A constant which can be used with the curve_id property of a KeyShape. CURVE_ID_NIST_P384
A constant which can be used with the curve_id property of a KeyShape. CURVE_ID_NIST_P521
A constant which can be used with the curve_id property of a KeyShape. algorithm
[Required] Gets the algorithm of this KeyShape. curve_id
Gets the curve_id of this KeyShape. length
[Required] Gets the length of this KeyShape. 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’.
-
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
-
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
-
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
-