Skip to content

Commit f3e4e25

Browse files
Tweaked unpack call to directly process little-endian integer, instead of reversing bytes first.
1 parent 8253041 commit f3e4e25

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/AppleBackupHashedManifestPlist.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ def initialize(manifest_path, decrypter, logger=nil)
5555

5656
if @encrypted
5757
tmp_manifest_string = @manifest_plist_data["ManifestKey"]
58-
@manifest_key_class = tmp_manifest_string[0,4].reverse.unpack("N")[0]
59-
@manifest_key = tmp_manifest_string.slice(4,tmp_manifest_string.length)
58+
@manifest_key_class = tmp_manifest_string[0,4].unpack("V")[0]
59+
@manifest_key = tmp_manifest_string[4,40]
6060
self.parse_keybag
6161
end
6262

0 commit comments

Comments
 (0)