Forum rules
Under no circumstances is spamming or advertising of any kind allowed. Do not post any abusive, obscene, vulgar, slanderous, hateful, threatening, sexually-orientated or any other material that may violate others security. Profanity or any kind of insolent behavior to other members (regardless of rank) will not be tolerated. Remember, what you don’t find offensive can be offensive to other members. Please treat each other with the kind of reverence you’d expect from other members.
Failure to comply with any of the above will result in users being banned without notice. If any further details are needed, contact: “The team” using the link at the bottom of the forum page. Thank you.
Sebaall
Posts: 2
Joined: Fri Jan 27, 2017 4:40 pm

Hash examples correctness

Fri Jan 27, 2017 4:47 pm

Hi.
I'm working on iOS app in Swift for downloading subtitles from OS. I implemented hashing algorithm basing on Swift 3 example. I tested it with 'breakdance.avi' file and got correct hash, i.e. 8e245d9679d31e12, but after testing it with 'dummy.rar' I got 2a527d74d45f5b1b instead of 61f7751fc2a72bfb as Hash algorithm documentation suggests. After not being able to find error in my code I checked Swift 3 implementation from documentation along with C++, Java and Ruby implementations. All of them gave me the same result as my implementation, which poses a question - are all implementations in documentation wrong or is it the hash for dummy.rar which is wrong?

sarathkcm
Posts: 54
Joined: Thu Aug 09, 2012 3:11 pm

Re: Hash examples correctness

Fri Jan 27, 2017 6:44 pm

I think you need to extract dummy.rar and calculate the hash for its content.

Sebaall
Posts: 2
Joined: Fri Jan 27, 2017 4:40 pm

Re: Hash examples correctness

Fri Jan 27, 2017 6:51 pm

I feel so stupid now. I read "unpacked" in documentation couple of times and tried with packed file. Somehow I confused this word's meaning with 'archived'. In my defense, English is not my first language. Thank you for your help!

Return to “Developing”

Who is online

Users browsing this forum: No registered users and 2 guests