Skip to content

Commit 7c25500

Browse files
authored
Remove checksum (#11)
Fixes #6 It's not actually enforced or verified and adds no value currently.
1 parent dc2d2a9 commit 7c25500

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

Diff for: lib/diffcrypt/encryptor.rb

-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ def encrypt(contents, original_encrypted_contents = nil)
5151
YAML.dump(
5252
'client' => "diffcrypt-#{Diffcrypt::VERSION}",
5353
'cipher' => CIPHER,
54-
'checksum' => Digest::MD5.hexdigest(Marshal.dump(data)),
5554
'data' => data,
5655
)
5756
end

Diff for: test/diffcrypt/encryptor_test.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
class Diffcrypt::EncryptorTest < Minitest::Test
1111
def test_it_includes_client_info_at_root
1212
content = "---\nkey: value"
13-
expected_pattern = /---\nclient: diffcrypt-#{Diffcrypt::VERSION}\ncipher: #{Diffcrypt::Encryptor::CIPHER}\nchecksum: [a-z0-9]{32}\ndata:\n key: #{ENCRYPTED_VALUE_PATTERN}\n/
13+
expected_pattern = /---\nclient: diffcrypt-#{Diffcrypt::VERSION}\ncipher: #{Diffcrypt::Encryptor::CIPHER}\ndata:\n key: #{ENCRYPTED_VALUE_PATTERN}\n/
1414
assert_match expected_pattern, Diffcrypt::Encryptor.new(TEST_KEY).encrypt(content)
1515
end
1616

0 commit comments

Comments
 (0)