Sha256: 53348895076ac8dfd7b33b2e57bc263c87966a0d77e6aaf14e84db2237b6ad41

Contents?: true

Size: 1.03 KB

Versions: 1

Compression:

Stored size: 1.03 KB

Contents

require_relative 'jce_keystore'

module Ccrypto
  module Java
    module Keystore

      class JKSKeystore
        include TR::CondUtils
        include DataConversion

        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 # from_jks

        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 # to_jks


        private
        def self.logger
          Ccrypto::Java.logger(:jks)
        end

      end # class PKCS12Keystore

    end # module Keystore
  end # module Java
end # module Ccrypto

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ccrypto-java-0.2.0 lib/ccrypto/java/keystore/jks_keystore.rb