Sha256: b713ce81d02b9ffded9d5d95d72039e45c6da8ae86ae4fe7323d2a5f243f2b18

Contents?: true

Size: 866 Bytes

Versions: 1

Compression:

Stored size: 866 Bytes

Contents

#!/usr/bin/env ruby
# frozen_string_literal: true

require "bundler/setup"
require "ccrypto/java"

path = File.join(File.dirname(__FILE__),"..","jars","*.jar")
puts "Loading BC library from #{File.dirname(path)}"
Dir.glob(path).each do |l|
  require File.expand_path(l)
end

BCPROV = org.bouncycastle.jce.provider.BouncyCastleProvider.new 
if not java.security.Security.get_providers.to_a.include?(BCPROV)
  java.security.Security.add_provider(BCPROV)
  puts "Provider #{BCPROV.name} #{BCPROV.version} loaded and added"
else
  puts "Provider #{BCPROV.name} #{BCPROV.version} loaded"
end

# You can add fixtures and/or initialization code here to make experimenting
# with your gem easier. You can also use a different console, if you like.

# (If you use this, don't forget to add pry to your Gemfile!)
# require "pry"
# Pry.start

require "irb"
IRB.start(__FILE__)

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ccrypto-java-0.2.0 bin/console