Class: Ccrypto::Java::Keystore::JKSKeystore

Inherits:
Object
  • Object
show all
Includes:
DataConversion, TR::CondUtils
Defined in:
lib/ccrypto/java/keystore/jks_keystore.rb

Class Method Summary collapse

Methods included from DataConversion

#from_b64, #from_b64_mime, #from_hex, included, #logger, #to_b64, #to_b64_mime, #to_bin, #to_hex, #to_java_bytes, #to_str

Class Method Details

.from_jks(bin, &block) ⇒ Object

Raises:

  • (Ccrypto::Keystore::KeystoreException)


12
13
14
15
16
17
18
19
20
21
22
23
24
25
# File 'lib/ccrypto/java/keystore/jks_keystore.rb', line 12

def self.from_jks(bin, &block)

  raise Ccrypto::Keystore::KeystoreException, "block is required" if not block

  JCEKeystore.from_keystore(bin, "JKS") do |k|
    case k
    when :logger
      logger
    else
      block.call(k)
    end
  end
 
end

.to_jks(&block) ⇒ Object

from_jks

Raises:

  • (Ccrypto::Keystore::KeystoreException)


27
28
29
30
31
32
33
34
35
36
37
38
39
40
# File 'lib/ccrypto/java/keystore/jks_keystore.rb', line 27

def self.to_jks(&block)

  raise Ccrypto::Keystore::KeystoreException, "Block is required" if not block

  JCEKeystore.to_keystore("JKS") do |k|
    case k
    when :logger
      logger
    else
      block.call(k)
    end
  end
 
end