Class: Virgil::Crypto::KeyPairType
- Inherits:
-
Object
- Object
- Virgil::Crypto::KeyPairType
- Defined in:
- lib/virgil/crypto/key_pair_type.rb
Overview
Enumeration containing supported KeyPairTypes
Defined Under Namespace
Classes: UnknownTypeException
Constant Summary collapse
- Default =
:Default
- RSA_2048 =
:RSA_2048
- RSA_3072 =
:RSA_3072
- RSA_4096 =
:RSA_4096
- RSA_8192 =
:RSA_8192
- EC_SECP256R1 =
:EC_SECP256R1
- EC_SECP384R1 =
:EC_SECP384R1
- EC_SECP521R1 =
:EC_SECP521R1
- EC_BP256R1 =
:EC_BP256R1
- EC_BP384R1 =
:EC_BP384R1
- EC_BP512R1 =
:EC_BP512R1
- EC_SECP256K1 =
:EC_SECP256K1
- EC_CURVE25519 =
:EC_CURVE25519
- FAST_EC_X25519 =
:FAST_EC_X25519
- FAST_EC_ED25519 =
:FAST_EC_ED25519
- TYPES_TO_NATIVE =
{ Default: Core::VirgilKeyPair::Type_FAST_EC_ED25519, RSA_2048: Core::VirgilKeyPair::Type_RSA_2048, RSA_3072: Core::VirgilKeyPair::Type_RSA_3072, RSA_4096: Core::VirgilKeyPair::Type_RSA_4096, RSA_8192: Core::VirgilKeyPair::Type_RSA_8192, EC_SECP256R1: Core::VirgilKeyPair::Type_EC_SECP256R1, EC_SECP384R1: Core::VirgilKeyPair::Type_EC_SECP384R1, EC_SECP521R1: Core::VirgilKeyPair::Type_EC_SECP521R1, EC_BP256R1: Core::VirgilKeyPair::Type_EC_BP256R1, EC_BP384R1: Core::VirgilKeyPair::Type_EC_BP384R1, EC_BP512R1: Core::VirgilKeyPair::Type_EC_BP512R1, EC_SECP256K1: Core::VirgilKeyPair::Type_EC_SECP256K1, EC_CURVE25519: Core::VirgilKeyPair::Type_EC_CURVE25519, FAST_EC_X25519: Core::VirgilKeyPair::Type_FAST_EC_X25519, FAST_EC_ED25519: Core::VirgilKeyPair::Type_FAST_EC_ED25519, }.freeze
Class Method Summary collapse
-
.convert_to_native(key_pair_type) ⇒ Integer
Converts type enum value to native value.
Class Method Details
.convert_to_native(key_pair_type) ⇒ Integer
Converts type enum value to native value
89 90 91 92 93 94 95 |
# File 'lib/virgil/crypto/key_pair_type.rb', line 89 def self.convert_to_native(key_pair_type) if TYPES_TO_NATIVE.key?(key_pair_type) return TYPES_TO_NATIVE[key_pair_type] end raise VirgilCryptoException, key_pair_type end |