View previous topic :: View next topic |
Author |
Message |
Noz3001 I'm a spammer Reputation: 26
Joined: 29 May 2006 Posts: 6220 Location: /dev/null
|
Posted: Tue May 29, 2007 11:15 am Post subject: appal |
|
|
I need help again =(.
Im trying to get the MD5 OR Sha1 of a file (Doesn't matter which one). Do you know how I can do this?
Google fails me again!
|
|
Back to top |
|
|
Flyte Peanuts!!!! Reputation: 6
Joined: 19 Apr 2006 Posts: 1887 Location: Canada
|
Posted: Tue May 29, 2007 12:01 pm Post subject: |
|
|
Wikipedia has psuedo-code for calculating the hash of a certain input.
Just convert to c and input a file.
http://en.wikipedia.org/wiki/MD5
|
|
Back to top |
|
|
appalsap Moderator Reputation: 0
Joined: 27 Apr 2006 Posts: 6753 Location: Pakistan
|
Posted: Tue May 29, 2007 12:11 pm Post subject: |
|
|
yeah but your own implementation will add considerable size to your application. Use the Windows CryptoAPI
edit: here is an example of this.
|
|
Back to top |
|
|
Flyte Peanuts!!!! Reputation: 6
Joined: 19 Apr 2006 Posts: 1887 Location: Canada
|
Posted: Tue May 29, 2007 1:18 pm Post subject: |
|
|
appalsap wrote: | yeah but your own implementation will add considerable size to your application. Use the Windows CryptoAPI
edit: here is an example of this. |
It comes down to if you want customization and speed, or simplicity and reliability.
The API requires another dll to be loaded into your address space anyways.
|
|
Back to top |
|
|
appalsap Moderator Reputation: 0
Joined: 27 Apr 2006 Posts: 6753 Location: Pakistan
|
Posted: Tue May 29, 2007 1:37 pm Post subject: |
|
|
Flyte wrote: | It comes down to if you want customization and speed, or simplicity and reliability. |
wait what do you mean by "customization", how can you customize a hash? and why do you think one service would be faster than the other?
Flyte wrote: | The API requires another dll to be loaded into your address space anyways. |
oh the horror and the humanity of it all
|
|
Back to top |
|
|
Noz3001 I'm a spammer Reputation: 26
Joined: 29 May 2006 Posts: 6220 Location: /dev/null
|
Posted: Tue May 29, 2007 2:55 pm Post subject: |
|
|
Ok, thanks.
|
|
Back to top |
|
|
Flyte Peanuts!!!! Reputation: 6
Joined: 19 Apr 2006 Posts: 1887 Location: Canada
|
Posted: Tue May 29, 2007 2:58 pm Post subject: |
|
|
appalsap wrote: | Flyte wrote: | It comes down to if you want customization and speed, or simplicity and reliability. |
wait what do you mean by "customization", how can you customize a hash? and why do you think one service would be faster than the other? |
1) If you wanted to you could make your own custom hash.
2) It can be faster because of code optimization.
3)
appalsap wrote: | 1. It is windows-specific, which would break an otherwise portable program. |
appalsap wrote: | Flyte wrote: | The API requires another dll to be loaded into your address space anyways. |
oh the horror and the humanity of it all |
One of the reasons why VB is so horrible.
|
|
Back to top |
|
|
appalsap Moderator Reputation: 0
Joined: 27 Apr 2006 Posts: 6753 Location: Pakistan
|
Posted: Tue May 29, 2007 3:13 pm Post subject: |
|
|
Flyte wrote: | 1) If you wanted to you could make your own custom hash. |
Yeah everyone goes through that stage, but eventually you will realize that you won't be able to write a better hashing algorithm than the ones tested by years of scrutiny, scientific and peer review.
Flyte wrote: | 2) It can be faster because of code optimization. |
Because the average person can code better than the people at Microsoft.
Flyte wrote: | 3) It is windows-specific, which would break an otherwise portable program. |
Very good point, I agree, and it was terrible for me to assume that he was going to make a Windows program but 99% of the time that is the case.
Flyte wrote: | One of the reasons why VB is so horrible. |
You mean the runtime DLL? That's not standard. what cryptoAPI uses, advapi32.dll will probably be loaded in your application anyway, it has a lot of functions that aren't related to cryptography such as the registry API.
|
|
Back to top |
|
|
Flyte Peanuts!!!! Reputation: 6
Joined: 19 Apr 2006 Posts: 1887 Location: Canada
|
Posted: Tue May 29, 2007 3:27 pm Post subject: |
|
|
appalsap wrote: | Yeah everyone goes through that stage, but eventually you will realize that you won't be able to write a better hashing algorithm than the ones tested by years of scrutiny, scientific and peer review. |
Good point, I agree with you there. Though writing your own is a good way to see how they work.
appalsap wrote: | Because the average person can code better than the people at Microsoft. |
You know as well as I that they program for reliability and not speed. If it was speed, Windows would be in ASM.
appalsap wrote: |
You mean the runtime DLL? That's not standard. what cryptoAPI uses, advapi32.dll will probably be loaded in your application anyway, it has a lot of functions that aren't related to cryptography such as the registry API. |
I was under the assumption that it had its own separate dll. Sorry about that.
|
|
Back to top |
|
|
Madman I post too much Reputation: 1
Joined: 04 May 2006 Posts: 3976
|
Posted: Tue May 29, 2007 3:37 pm Post subject: |
|
|
lol, /\ /\ /\
analytical post reviewing at it's finest.
_________________
|
|
Back to top |
|
|
Noz3001 I'm a spammer Reputation: 26
Joined: 29 May 2006 Posts: 6220 Location: /dev/null
|
Posted: Tue May 29, 2007 4:59 pm Post subject: |
|
|
Ok, i've got it working now ^^. Stage 1 of my Anti-Cheat program is complete =D
|
|
Back to top |
|
|
|