underlock 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 119bd81d62404e27d72d8f5fe722dbc1d0dd66e6
4
- data.tar.gz: 6823f03d3443e52af8826a173575b40e4affa5a0
3
+ metadata.gz: b95f4af7691d4a150b9b556aabd2c950eb6bc990
4
+ data.tar.gz: 7e247b1e98d6bb83b72212d6ea22b5e1529d896f
5
5
  SHA512:
6
- metadata.gz: d6aa47621603772e05c99ee9f34a72240696893310fae5607198b24b6dbc071e6dcd996a11b66b60aaf449059020a316398076fde85c599d6dc9738d538a0ef9
7
- data.tar.gz: acc029d3252215bda7309b9b25b910fec694e51107e6d1c816edeab6826c87fe69d8fb1415fae9c12b7edca323de5058768cdfd4fc004c535424b367c5265e35
6
+ metadata.gz: d721fd3e55147fafc540f2a9e1f43b5d9cd0def7f60e6b2331f8d4af59147e83b0c12ab9cc695d5f97579a9f40f8bceeefae480f3ccec0a4bfbd020073ac5ec5
7
+ data.tar.gz: bbf68367412a2f48e5542f6a3a78db43a438aa81971044ab51feb9fcc6062e016615ebb7d716741887c46d8df48a3544e446cda4a51798ab12ed073750017542
@@ -9,8 +9,8 @@ module Underlock
9
9
  key = cipher.random_key
10
10
  iv = cipher.random_iv
11
11
 
12
- File.open(encrypted_filepath, "w") do |encrypted_file|
13
- File.open(file) do |inf|
12
+ File.open(encrypted_filepath, "wb") do |encrypted_file|
13
+ File.open(file, 'rb') do |inf|
14
14
  loop do
15
15
  r = inf.read(4096)
16
16
  break unless r
@@ -36,7 +36,7 @@ module Underlock
36
36
  @base_dir, @filename = File.split(encrypted_entity.encrypted_file)
37
37
 
38
38
  File.open(decrypted_filepath, 'wb') do |decrypted_file|
39
- File.open(encrypted_entity.encrypted_file) do |inf|
39
+ File.open(encrypted_entity.encrypted_file, 'rb') do |inf|
40
40
  loop do
41
41
  r = inf.read(4096)
42
42
  break unless r
@@ -1,3 +1,3 @@
1
1
  module Underlock
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: underlock
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jasdeep Singh
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-02-03 00:00:00.000000000 Z
11
+ date: 2017-03-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dry-configurable