Module: Crypto

Extended by:
CryptoHelper
Defined in:
lib/crypto-lite/metal.rb,
lib/crypto-lite/config.rb,
lib/crypto-lite/helper.rb,
lib/crypto-lite/sign_rsa.rb

Defined Under Namespace

Modules: Metal, MetalHelper, RSA Classes: Configuration

Class Method Summary collapse

Methods included from CryptoHelper

base58, base58check, hash160, hash256, keccak256, rmd160, sha256, sha3_256

Class Method Details

.configurationObject

lets you use

Crypto.configure do |config|
   config.debug  =  true
end


18
19
20
# File 'lib/crypto-lite/config.rb', line 18

def self.configuration
  @configuration ||= Configuration.new
end

.configure {|configuration| ... } ⇒ Object

Yields:



22
23
24
# File 'lib/crypto-lite/config.rb', line 22

def self.configure
  yield( configuration )
end

.debug=(value) ⇒ Object



28
# File 'lib/crypto-lite/config.rb', line 28

def self.debug=(value) self.configuration.debug = value; end

.debug?Boolean

add convenience helper for format

Returns:

  • (Boolean)


27
# File 'lib/crypto-lite/config.rb', line 27

def self.debug?() configuration.debug?; end