Module: Travis::Encrypt
- Defined in:
- lib/travis/encrypt.rb,
lib/travis/encrypt/common.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: Common, Helpers
Classes: Decryptor, Encryptor
Constant Summary
collapse
- PREFIX =
'--ENCR--'
- VERSION =
'0.0.1'
Class Attribute Summary collapse
Class Method Summary
collapse
Class Attribute Details
.key ⇒ Object
Returns the value of attribute key.
12
13
14
|
# File 'lib/travis/encrypt.rb', line 12
def key
@key
end
|
Class Method Details
.decrypt(string, options) ⇒ Object
22
23
24
|
# File 'lib/travis/encrypt.rb', line 22
def decrypt(string, options)
Decryptor.new(string, { key: key }.merge(options)).apply
end
|
.encrypt(string, options) ⇒ Object
18
19
20
|
# File 'lib/travis/encrypt.rb', line 18
def encrypt(string, options)
Encryptor.new(string, { key: key }.merge(options)).apply
end
|
.setup(config) ⇒ Object
14
15
16
|
# File 'lib/travis/encrypt.rb', line 14
def setup(config)
self.key = config[:key]
end
|