diff --git a/README.md b/README.md index 70275c6..6e5bc50 100644 --- a/README.md +++ b/README.md @@ -62,8 +62,8 @@ require 'ooxml_encryption' decryptor = OoxmlEncryption.new decrypted_data = decryptor.decrypt( - encrypted_spreadsheeet_data: encrypted_data, - password: password + encrypted_spreadsheet_data: encrypted_data, + password: password ) ``` diff --git a/lib/ooxml_encryption/ooxml_encryption.rb b/lib/ooxml_encryption/ooxml_encryption.rb index 8f644b4..c35c297 100644 --- a/lib/ooxml_encryption/ooxml_encryption.rb +++ b/lib/ooxml_encryption/ooxml_encryption.rb @@ -299,15 +299,15 @@ def encrypt(unencrypted_spreadsheet_data:, password:) # underlying CFB file format used to store the data is not streamable itself; # see the SimpleCFB gem for details. # - # +encrypted_spreadsheeet_data+:: Encrypted OOXML input data as an ASCII-8BIT + # +encrypted_spreadsheet_data+:: Encrypted OOXML input data as an ASCII-8BIT # encoded string. # # +password+:: Password for decryption in your choice of # string encoding. # - def decrypt(encrypted_spreadsheeet_data:, password:) + def decrypt(encrypted_spreadsheet_data:, password:) cfb = SimpleCfb.new - cfb.parse!(StringIO.new(encrypted_spreadsheeet_data)) + cfb.parse!(StringIO.new(encrypted_spreadsheet_data)) encryption_info_xml = cfb.file_index.find { |f| f.name == 'EncryptionInfo' }&.content encrypted_spreadsheet_data = cfb.file_index.find { |f| f.name == 'EncryptedPackage' }&.content diff --git a/spec/lib/ooxml_encryption_spec.rb b/spec/lib/ooxml_encryption_spec.rb index 016f956..376de91 100644 --- a/spec/lib/ooxml_encryption_spec.rb +++ b/spec/lib/ooxml_encryption_spec.rb @@ -29,8 +29,8 @@ encryptor = described_class.new decrypted = encryptor.decrypt( - encrypted_spreadsheeet_data: input_enc_xlsx, - password: 'secret' + encrypted_spreadsheet_data: input_enc_xlsx, + password: 'secret' ) expect(decrypted).to match(node_unenc_output)