Module: Sekret
- Defined in:
- lib/sekret.rb,
lib/sekret/cli.rb,
lib/sekret/errors.rb,
lib/sekret/header.rb,
lib/sekret/encoder.rb,
lib/sekret/version.rb,
lib/sekret/checksum.rb,
lib/sekret/decryptor.rb,
lib/sekret/encryptor.rb,
lib/sekret/cli/runner.rb,
lib/sekret/configuration.rb,
lib/sekret/key_generator.rb,
lib/sekret/body_encryption.rb
Overview
Used for encrypting/decrypting data
Defined Under Namespace
Modules: CLI, Errors Classes: BodyEncryption, Checksum, Configuration, Decryptor, Encoder, Encryptor, Header, KeyGenerator
Constant Summary collapse
- VERSION =
The current version of Sekret
'1.0.0'.freeze
- CONFIG_MUTEX =
The config lock
Mutex.new
Class Method Summary collapse
-
.config ⇒ Configuration
Retuns a new config.
-
.configure {|config| ... } ⇒ Object
Configuration.
-
.decrypt(message) ⇒ String
Decrypt the passed payload.
-
.encrypt(payload) ⇒ String
Encrypt the passed payload.
Class Method Details
.config ⇒ Configuration
Retuns a new config
20 21 22 23 24 |
# File 'lib/sekret/configuration.rb', line 20 def self.config CONFIG_MUTEX.synchronize do @config ||= Configuration.new(nil, nil, nil) end end |
.configure {|config| ... } ⇒ Object
Configuration
28 29 30 |
# File 'lib/sekret/configuration.rb', line 28 def self.configure yield config end |