Module: Yasst::Primatives::OpenSSL::Metadata
- Included in:
- Yasst::Profiles::OpenSSL
- Defined in:
- lib/yasst/primatives/openssl/metadata.rb
Overview
Methods for returning various bits of information
Class Method Summary collapse
-
.iv_len_for(alg) ⇒ Object
Return the key length for a given cipher algorithm.
-
.key_len_for(alg) ⇒ Object
Return the key length for a given cipher algorithm.
-
.list_ciphers ⇒ Object
List available ciphers.
Class Method Details
.iv_len_for(alg) ⇒ Object
Return the key length for a given cipher algorithm
22 23 24 25 |
# File 'lib/yasst/primatives/openssl/metadata.rb', line 22 def self.iv_len_for(alg) cipher = ::OpenSSL::Cipher.new(alg) cipher.iv_len end |
.key_len_for(alg) ⇒ Object
Return the key length for a given cipher algorithm
16 17 18 19 |
# File 'lib/yasst/primatives/openssl/metadata.rb', line 16 def self.key_len_for(alg) cipher = ::OpenSSL::Cipher.new(alg) cipher.key_len end |
.list_ciphers ⇒ Object
List available ciphers
11 12 13 |
# File 'lib/yasst/primatives/openssl/metadata.rb', line 11 def self.list_ciphers ::OpenSSL::Cipher.ciphers end |