Module: Travis::Encrypt
- Defined in:
- lib/travis/encrypt.rb,
lib/travis/encrypt/base.rb,
lib/travis/encrypt/helpers.rb,
lib/travis/encrypt/version.rb,
lib/travis/encrypt/decryptor.rb,
lib/travis/encrypt/encryptor.rb,
lib/travis/encrypt/helpers/common.rb,
lib/travis/encrypt/helpers/sequel.rb,
lib/travis/encrypt/helpers/active_record.rb
Defined Under Namespace
Modules: Helpers
Classes: Base, Decryptor, Encryptor
Constant Summary
collapse
- PREFIX =
'--ENCR--'
- VERSION =
'0.0.5'
Class Attribute Summary collapse
Class Method Summary
collapse
Class Attribute Details
.key ⇒ Object
Returns the value of attribute key.
13
14
15
|
# File 'lib/travis/encrypt.rb', line 13
def key
@key
end
|
Class Method Details
.decrypt(string, options) ⇒ Object
23
24
25
|
# File 'lib/travis/encrypt.rb', line 23
def decrypt(string, options)
Decryptor.new(string, { key: key }.merge(options)).apply
end
|
.encrypt(string, options) ⇒ Object
19
20
21
|
# File 'lib/travis/encrypt.rb', line 19
def encrypt(string, options)
Encryptor.new(string, { key: key }.merge(options)).apply
end
|
.setup(config) ⇒ Object
15
16
17
|
# File 'lib/travis/encrypt.rb', line 15
def setup(config)
self.key = config[:key]
end
|