No commit activity in last 3 years
No release in over 3 years
Encrypt Decrypt Any file using OpenSSL::AES
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0
>= 0

Runtime

 Project Readme

Build StatusGem Version

Encrypter Decrypter Files

A Ruby Gem to Secure your files Easily Using OpenSSL::AES Standars

Installation

gem install encrypter_decrypter_files

Usage

Encryption

Ankits-MacBook-Pro:encrypter_decrypter_files ankitgupta$ irb
1.9.3-p448 :001 > require 'encrypter_decrypter_files'
=> true 
1.9.3-p448 :002 > EDfile.encrypt(path: 'foo.txt')
=> 123 

You can also pass on the key_size by default it's 256

Ankits-MacBook-Pro:encrypter_decrypter_files ankitgupta$ irb
1.9.3-p448 :001 > require 'encrypter_decrypter_files'
=> true 
1.9.3-p448 :002 > EDfile.encrypt(path: 'foo.txt',key_size: 128)
=> 122

The Above will store the values in a iv_key.yml, Eg

foo.txt:
  :iv: !binary |-
    fu/JUHy+i1+Tz1NcdF2m6A==
  :key: !binary |-
    jTvX8mJDrvRA/RdyXnlgpA+5i18hMjbPX4DGaLiROFw=

Decryption

Ankits-MacBook-Pro:encrypter_decrypter_files ankitgupta$ irb
1.9.3-p448 :001 > require 'encrypter_decrypter_files'
=> true 
1.9.3-p448 :002 > EDfile.decrypt(path: 'foo.txt.enc')
"Holla, Decrypted!"
=> nil 

Licensing

The gem itself is released under the MIT license

🙏