It is currently Sun Aug 19, 2018 11:09 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 31 posts ]  Go to page 1, 2, 3  Next
Author Message
 Post subject: Cryptographic Hash Functions Collection (IncludeFile)
PostPosted: Thu Aug 02, 2007 2:40 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Fri Jun 30, 2006 4:30 pm
Posts: 578
Location: Middle East
Cryptographic Hash Functions IncludeFile

Includes the following algorithms:
Whirlpool
RIPEMD160
MD2
MD4
MD5
HAVAL256
GOST
SHA
SHA1
SHA224
SHA256
SHA384
SHA512

Sample Use
Quote:
Global string_sample.= "The quick brown fox jumps over the lazy dog"

Debug PureHash_WhirlpoolFingerprint(@string_sample, Len(string_sample))
Debug PureHash_RIPEMD160Fingerprint(@string_sample, Len(string_sample))
Debug PureHash_MD2Fingerprint(@string_sample, Len(string_sample))
Debug PureHash_MD4Fingerprint(@string_sample, Len(string_sample))
Debug PureHash_MD5Fingerprint(@string_sample, Len(string_sample))
Debug PureHash_HAVAL256Fingerprint(@string_sample, Len(string_sample))
Debug PureHash_GOSTFingerprint(@string_sample, Len(string_sample))
Debug PureHash_SHAFingerprint(@string_sample, Len(string_sample))
Debug PureHash_SHA1Fingerprint(@string_sample, Len(string_sample))
Debug PureHash_SHA224Fingerprint(@string_sample, Len(string_sample))
Debug PureHash_SHA256Fingerprint(@string_sample, Len(string_sample))
Debug PureHash_SHA384Fingerprint(@string_sample, Len(string_sample))
Debug PureHash_SHA512Fingerprint(@string_sample, Len(string_sample))

Quote:
Debug PureHash_WhirlpoolFileFingerprint("C:\test.log")
Debug PureHash_RIPEMD160FileFingerprint("C:\test.log")
Debug PureHash_MD2FileFingerprint("C:\test.log")
Debug PureHash_MD4FileFingerprint("C:\test.log")
Debug PureHash_MD5FileFingerprint("C:\test.log")
Debug PureHash_GOSTFileFingerprint("C:\test.log")
Debug PureHash_SHAFileFingerprint("C:\test.log")
Debug PureHash_SHA1FileFingerprint("C:\test.log")
Debug PureHash_SHA224FileFingerprint("C:\test.log")
Debug PureHash_SHA256FileFingerprint("C:\test.log")
Debug PureHash_SHA384FileFingerprint("C:\test.log")
Debug PureHash_SHA512FileFingerprint("C:\test.log")


Download:
http://purebasic.jcvsite.com/v4/HashLib.zip

Use at your own risk. :wink:

_________________

[Registered PB User since 2006]
[PureBasic 5.5] [Win 10 64bit]
[Intel i7 990x 3.47 Ghz] [18GB DDR3]


Last edited by JCV on Wed Sep 17, 2008 5:56 pm, edited 4 times in total.

Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Aug 02, 2007 7:00 pm 
Offline
PureBasic Fanatic
PureBasic Fanatic

Joined: Fri Dec 09, 2005 12:15 pm
Posts: 2236
Location: Elbonia
Amazing! Thank you!

_________________
None are more hopelessly enslaved than those who falsely believe they are free. (Goethe)


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Aug 02, 2007 9:28 pm 
Offline
PureBasic Expert
PureBasic Expert

Joined: Wed Oct 29, 2003 4:35 pm
Posts: 10426
Location: Beyond the pale...
Looks very useful indeed, thank you very much. 8)

_________________
I may look like a mule, but I'm not a complete ass.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Aug 02, 2007 9:43 pm 
Offline
Enthusiast
Enthusiast

Joined: Sun Dec 19, 2004 10:55 pm
Posts: 160
Location: Munich
Your my personal hero of the month :D
All we need now are easy to use and good documented cipher functions for AES, Twofish, etc.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri Aug 03, 2007 3:37 am 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Fri Jun 30, 2006 4:30 pm
Posts: 578
Location: Middle East
Updated:
-Now supports FileFingerprint
-Code cleanup

Supported FileFingerprint Functions:
Quote:
Debug PureHash_WhirlpoolFileFingerprint("c:\data.rar")
Debug PureHash_RIPEMD160FileFingerprint("c:\data.rar")
Debug PureHash_MD2FileFingerprint("c:\data.rar")
Debug PureHash_MD4FileFingerprint("c:\data.rar")
Debug PureHash_MD5FileFingerprint("c:\data.rar")
Debug MD5FileFingerprint("c:\data.rar")
; Debug PureHash_HAVAL256FileFingerprint("c:\data.rar"); NOT YET WORKING
Debug PureHash_GOSTFileFingerprint("c:\data.rar")
Debug PureHash_SHAFileFingerprint("c:\data.rar")
Debug PureHash_SHA1FileFingerprint("c:\data.rar")
Debug PureHash_SHA224FileFingerprint("c:\data.rar")
Debug PureHash_SHA256FileFingerprint("c:\data.rar")
Debug PureHash_SHA384FileFingerprint("c:\data.rar")
Debug PureHash_SHA512FileFingerprint("c:\data.rar")


Not currently supported:
PureHash_HAVAL256FileFingerprint - I'm getting some invalid memory headaches. :?

I compared built-in MD5 in PB and PureHash_MD5 is 3X faster. :)

_________________

[Registered PB User since 2006]
[PureBasic 5.5] [Win 10 64bit]
[Intel i7 990x 3.47 Ghz] [18GB DDR3]


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri Aug 03, 2007 4:00 am 
Offline
Enthusiast
Enthusiast

Joined: Mon Apr 02, 2007 1:43 am
Posts: 635
Location: Brazil
Really really nice.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri Aug 03, 2007 11:59 am 
Offline
PureBasic Fanatic
PureBasic Fanatic

Joined: Fri Dec 09, 2005 12:15 pm
Posts: 2236
Location: Elbonia
@JCV

Can you make this lib support threadsafe? When I use it and enable the threadsafe flad in the compiler options, I get 'Unresolved external symbol _PB_StringBasePosition'.

_________________
None are more hopelessly enslaved than those who falsely believe they are free. (Goethe)


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri Aug 03, 2007 2:18 pm 
Offline
Addict
Addict
User avatar

Joined: Wed Dec 22, 2004 4:12 pm
Posts: 2441
Location: Norway
JCV wrote:
I compared built-in MD5 in PB and PureHash_MD5 is 3X faster. :)

Wow, pretty good!

_________________
I like logic, hence I dislike humans but love computers.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri Aug 03, 2007 2:47 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Fri Jun 30, 2006 4:30 pm
Posts: 578
Location: Middle East
Updated:
Added
-ThreadSafe PureLib
-Unicode PureLib
-Unicode ThreadSafe PureLib

_________________

[Registered PB User since 2006]
[PureBasic 5.5] [Win 10 64bit]
[Intel i7 990x 3.47 Ghz] [18GB DDR3]


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri Aug 03, 2007 5:34 pm 
Offline
PureBasic Fanatic
PureBasic Fanatic

Joined: Fri Dec 09, 2005 12:15 pm
Posts: 2236
Location: Elbonia
Super! Thank you for the fast update :D.

_________________
None are more hopelessly enslaved than those who falsely believe they are free. (Goethe)


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sat Aug 04, 2007 3:37 pm 
Offline
Enthusiast
Enthusiast

Joined: Tue Apr 24, 2007 11:14 pm
Posts: 347
Why don't you release a help file too


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sun Aug 05, 2007 8:09 am 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Fri Jun 30, 2006 4:30 pm
Posts: 578
Location: Middle East
michaeled314 wrote:
Why don't you release a help file too

Do I really need to make? What only differs in built-in pb function is the algorithm used. (NAMEFileFingerprint and NAMEFingerprint) :?

_________________

[Registered PB User since 2006]
[PureBasic 5.5] [Win 10 64bit]
[Intel i7 990x 3.47 Ghz] [18GB DDR3]


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sun Aug 12, 2007 1:22 pm 
Offline
User
User
User avatar

Joined: Wed Nov 16, 2005 7:51 pm
Posts: 88
Location: France
JCV wrote:
michaeled314 wrote:
Why don't you release a help file too

Do I really need to make?


yes, or else, your great lib will be use only by the best programers. Isn't it a shame?. Would you make this help, for all cryptographic functions of your lib 8) please.

Thanks

_________________
PureBasicien tu es, PureBasicien tu resteras.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Mon Aug 20, 2007 6:11 pm 
Offline
User
User

Joined: Mon Aug 20, 2007 6:03 pm
Posts: 20
Location: Germany
Hi,

the Lib is great, but if i enable ThreadSafe, i get this error message:

Image

is that a bug in the library? i have copied all the files in the right directory. (The Lib in PureLibraries\UserLibraries and the SubSystem Files in Subsystem\[Directory])

i have to use TheadSafe, otherwise i get an IMA in my program. when i saw, that it does'nt work with PB4.10beta, i tried PB4.02, but there was the same error.

Can u help me please?


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Tue Aug 21, 2007 7:42 am 
Offline
PureBasic Expert
PureBasic Expert
User avatar

Joined: Sat Apr 26, 2003 8:27 am
Posts: 4229
Location: Strasbourg / France
PBUser wrote:
Hi,
the Lib is great, but if i enable ThreadSafe, i get this error message: ...

Did you enable the 'UserLibThreadSafe' subsystem in the IDE ?

_________________
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 31 posts ]  Go to page 1, 2, 3  Next

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye