Module: Ccrypto::Java

Includes:
TR::CondUtils
Defined in:
lib/ccrypto/java.rb,
lib/ccrypto/provider.rb,
lib/ccrypto/java/version.rb,
lib/ccrypto/java/jce_provider.rb,
lib/ccrypto/java/data_conversion.rb,
lib/ccrypto/java/bc_const_mapping.rb,
lib/ccrypto/java/utils/comparator.rb,
lib/ccrypto/java/keystore/keystore.rb,
lib/ccrypto/java/engines/ecc_engine.rb,
lib/ccrypto/java/engines/rsa_engine.rb,
lib/ccrypto/java/engines/asn1_engine.rb,
lib/ccrypto/java/engines/asn1_object.rb,
lib/ccrypto/java/engines/hkdf_engine.rb,
lib/ccrypto/java/engines/hmac_engine.rb,
lib/ccrypto/java/engines/x509_engine.rb,
lib/ccrypto/java/utils/memory_buffer.rb,
lib/ccrypto/java/utils/native_helper.rb,
lib/ccrypto/java/engines/pkcs7_engine.rb,
lib/ccrypto/java/engines/argon2_engine.rb,
lib/ccrypto/java/engines/bcrypt_engine.rb,
lib/ccrypto/java/engines/cipher_engine.rb,
lib/ccrypto/java/engines/digest_engine.rb,
lib/ccrypto/java/engines/pbkdf2_engine.rb,
lib/ccrypto/java/engines/scrypt_engine.rb,
lib/ccrypto/java/engines/x25519_engine.rb,
lib/ccrypto/java/keystore/jce_keystore.rb,
lib/ccrypto/java/keystore/jks_keystore.rb,
lib/ccrypto/java/keystore/pem_keystore.rb,
lib/ccrypto/java/engines/ed25519_engine.rb,
lib/ccrypto/java/engines/x509_csr_engine.rb,
lib/ccrypto/java/keystore/pkcs12_keystore.rb,
lib/ccrypto/java/engines/secret_key_engine.rb,
lib/ccrypto/java/engines/compression_engine.rb,
lib/ccrypto/java/engines/crystal_kyber_engine.rb,
lib/ccrypto/java/engines/decompression_engine.rb,
lib/ccrypto/java/engines/secure_random_engine.rb,
lib/ccrypto/java/engines/secret_sharing_engine.rb,
lib/ccrypto/java/engines/data_conversion_engine.rb,
lib/ccrypto/java/engines/crystal_dilithium_engine.rb

Defined Under Namespace

Modules: BCConstMapping, DataConversion, Keystore Classes: ASN1Engine, ASN1Object, Argon2Engine, BCryptEngine, CipherEngine, ComparatorUtil, Compression, CrystalDilithiumEngine, CrystalDilithiumEngineError, CrystalDilithiumKeyBundle, CrystalDilithiumPrivateKey, CrystalDilithiumPublicKey, CrystalKyberEngine, CrystalKyberKEM, CrystalKyberKeyBundle, CrystalKyberPrivateKey, CrystalKyberPublicKey, DataConversionEngine, Decompression, DigestEngine, ECCEngine, ECCKeyBundle, ECCPrivateKey, ECCPublicKey, ED25519Engine, ED25519KeyBundle, ED25519PrivateKey, ED25519PublicKey, Error, HKDFEngine, HMACEngine, JCEProvider, JCEProviderException, ManagedMemoryBuffer, NativeHelper, PBKDF2Engine, PKCS7Engine, PKCS7EngineException, Provider, RSAEngine, RSAKeyBundle, RSAPrivateKey, RSAPublicKey, ScryptEngine, SecretKeyEngine, SecretKeyEngineException, SecretSharingEngine, SecretSharingException, SecureRandomEngine, X25519Engine, X25519KeyBundle, X25519PrivateKey, X25519PublicKey, X509CSREngine, X509Engine

Constant Summary collapse

READ_BUF_SIZE =

Your code goes hereā€¦

102400
ENV_PROBE_DIGEST_KEY =
"CC_PROBE_DIGEST"
Comparator =
ComparatorUtil
VERSION =
"0.2.0"

Class Method Summary collapse

Class Method Details

.if_detail_debug(msg) ⇒ Object



60
61
62
# File 'lib/ccrypto/java.rb', line 60

def self.if_detail_debug(msg)
  logger.tdebug(:jdetail_debug, msg) if is_detail_debug_on?
end

.is_detail_debug_on?Boolean

Returns:

  • (Boolean)


68
69
70
# File 'lib/ccrypto/java.rb', line 68

def self.is_detail_debug_on?
  ENV['CCJAVA_DEBUG'] == "true"
end

.logger(tag = nil, &block) ⇒ Object



37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# File 'lib/ccrypto/java.rb', line 37

def self.logger(tag = nil, &block)
   if @_logger.nil?
     @_logger = TeLogger::Tlogger.new
   end

  if block
   if not_empty?(tag)
     @_logger.with_tag(tag, &block)
   else
     @_logger.with_tag(@_logger.tag, &block)
   end
 else
   if is_empty?(tag)
     @_logger.tag = :CryptoJava
     @_logger
   else
     # no block but tag is given? hmm
     @_logger.tag = tag
     @_logger
   end
 end
end

.on_detail_debug(msg) ⇒ Object



64
65
66
# File 'lib/ccrypto/java.rb', line 64

def self.on_detail_debug(msg)
  if_detail_debug(msg)
end