Skip to content

Commit

Permalink
Typo fix - 'sheeet' -> 'sheet'
Browse files Browse the repository at this point in the history
  • Loading branch information
pond committed Aug 8, 2022
1 parent 162d17e commit 40a2c05
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
```

Expand Down
6 changes: 3 additions & 3 deletions lib/ooxml_encryption/ooxml_encryption.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions spec/lib/ooxml_encryption_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 40a2c05

Please sign in to comment.