Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions lib/ezcrypto.rb
Original file line number Diff line number Diff line change
Expand Up @@ -364,9 +364,12 @@ def on_cipher(&block)


=begin rdoc
Encrypt a file 'inplace' and add a suffix
see #cipher_file.
Encrypt a file 'inplace' and add a suffix.
IMPORTANT: The inputfile will be deleted by default.

Options:
* suffix: string added to src if tgt is not provided. Default: '.ez'
* autoclean: remove the source file if true. Default: 'true'
=end
def encrypt_file(src, tgt=nil, options = {} )
options = { :suffix => '.ez', :autoclean => 'true' }.update(options)
Expand All @@ -377,8 +380,11 @@ def encrypt_file(src, tgt=nil, options = {} )

=begin rdoc
Decrypt a file 'inplace' and remove a suffix
see #cipher_file
IMPORTANT: The inputfile will be deleted by default.

Options:
* suffix: string removed from src if tgt is not provided. Default: '.ez'
* autoclean: remove the source file if true. Default: 'true'
=end
def decrypt_file(src, tgt=nil, options = {} )
options = { :suffix => '.ez', :autoclean => 'true' }.update(options)
Expand Down