Developed or developing a new product in PureBasic? Tell the world about it.
			
		
		
			
				
																			
								JCV 							 
						Enthusiast 			
		Posts:  580 Joined:  Fri Jun 30, 2006 4:30 pmLocation:  Philippines 
		
						
						
													
							
						
									
						Post 
					 
								by JCV  Thu Aug 02, 2007 2:40 pm 
			
			
			
			
			Cryptographic Hash Functions IncludeFile Includes the following algorithms: 
Whirlpool
RIPEMD160
MD2
MD4
MD5
HAVAL256
GOST
SHA
SHA1
SHA224
SHA256
SHA384
SHA512
Sample Use
Global  string_sample .s  =  "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 ))
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.   
					Last edited by 
JCV  on Wed Sep 17, 2008 5:56 pm, edited 4 times in total.
									
						 
		 
				
		
		 
	 
				
			
		
		
			
				
																			
								Inf0Byt3 							 
						PureBasic Fanatic 			
		Posts:  2236 Joined:  Fri Dec 09, 2005 12:15 pmLocation:  Elbonia 
		
						
						
						 
													
							
						
									
						Post 
					 
								by Inf0Byt3  Thu Aug 02, 2007 7:00 pm 
			
			
			
			
			Amazing! Thank you!
			
			
									
									None are more hopelessly enslaved than those who falsely believe they are free. (Goethe) 
						 
		 
				
		
		 
	 
	
						
		
		
			
				
																			
								srod 							 
						PureBasic Expert 			
		Posts:  10589 Joined:  Wed Oct 29, 2003 4:35 pmLocation:  Beyond the pale... 
		
						
						
						 
													
							
						
									
						Post 
					 
								by srod  Thu Aug 02, 2007 9:28 pm 
			
			
			
			
			Looks very useful indeed, thank you very much.  
I may look like a mule, but I'm not a complete ass.
						 
		 
				
		
		 
	 
	
						
		
		
			
				
																			
								Sebe 							 
						Enthusiast 			
		Posts:  160 Joined:  Sun Dec 19, 2004 10:55 pmLocation:  Munich
				Contact: 
				
			 
				
		 
		
						
						
						 
													
							
						
									
						Post 
					 
								by Sebe  Thu Aug 02, 2007 9:43 pm 
			
			
			
			
			Your my personal hero of the month  
All we need now are easy to use and good documented cipher functions for AES, Twofish, etc.
 
		 
				
		
		 
	 
	
						
		
		
			
				
																			
								JCV 							 
						Enthusiast 			
		Posts:  580 Joined:  Fri Jun 30, 2006 4:30 pmLocation:  Philippines 
		
						
						
						 
													
							
						
									
						Post 
					 
								by JCV  Fri Aug 03, 2007 3:37 am 
			
			
			
			
			Updated:  
-Now supports 
FileFingerprint 
-Code cleanup
Supported FileFingerprint Functions:
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.  
						 
		 
				
		
		 
	 
	
						
		
		
			
				
																			
								byo 							 
						Enthusiast 			
		Posts:  635 Joined:  Mon Apr 02, 2007 1:43 amLocation:  Brazil 
		
						
						
						 
													
							
						
									
						Post 
					 
								by byo  Fri Aug 03, 2007 4:00 am 
			
			
			
			
			Really really nice.
			
			
									
									
						 
		 
				
		
		 
	 
	
						
		
		
			
				
																			
								Inf0Byt3 							 
						PureBasic Fanatic 			
		Posts:  2236 Joined:  Fri Dec 09, 2005 12:15 pmLocation:  Elbonia 
		
						
						
						 
													
							
						
									
						Post 
					 
								by Inf0Byt3  Fri Aug 03, 2007 11:59 am 
			
			
			
			
			@JCV 
			
			
									
									None are more hopelessly enslaved than those who falsely believe they are free. (Goethe) 
						 
		 
				
		
		 
	 
	
						
		
		
			
				
								Joakim Christiansen 							 
						Addict 			
		Posts:  2452 Joined:  Wed Dec 22, 2004 4:12 pmLocation:  Norway
				Contact: 
				
			 
				
		 
		
						
						
						 
													
							
						
									
						Post 
					 
								by Joakim Christiansen  Fri Aug 03, 2007 2:18 pm 
			
			
			
			
			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.
						 
		 
				
		
		 
	 
	
						
		
		
			
				
																			
								JCV 							 
						Enthusiast 			
		Posts:  580 Joined:  Fri Jun 30, 2006 4:30 pmLocation:  Philippines 
		
						
						
						 
													
							
						
									
						Post 
					 
								by JCV  Fri Aug 03, 2007 2:47 pm 
			
			
			
			
			Updated:  Added 
			
			
									
									
						 
		 
				
		
		 
	 
	
						
		
		
			
				
																			
								Inf0Byt3 							 
						PureBasic Fanatic 			
		Posts:  2236 Joined:  Fri Dec 09, 2005 12:15 pmLocation:  Elbonia 
		
						
						
						 
													
							
						
									
						Post 
					 
								by Inf0Byt3  Fri Aug 03, 2007 5:34 pm 
			
			
			
			
			Super! Thank you for the fast update 
.
None are more hopelessly enslaved than those who falsely believe they are free. (Goethe) 
						 
		 
				
		
		 
	 
	
						
	
						
		
		
			
				
																			
								JCV 							 
						Enthusiast 			
		Posts:  580 Joined:  Fri Jun 30, 2006 4:30 pmLocation:  Philippines 
		
						
						
						 
													
							
						
									
						Post 
					 
								by JCV  Sun Aug 05, 2007 8:09 am 
			
			
			
			
			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. (
NAME FileFingerprint and 
NAME Fingerprint)  
						 
		 
				
		
		 
	 
	
						
		
		
			
				
								Jacobus 							 
						Enthusiast 			
		Posts:  149 Joined:  Wed Nov 16, 2005 7:51 pmLocation:  France
				Contact: 
				
			 
				
		 
		
						
						
						 
													
							
						
									
						Post 
					 
								by Jacobus  Sun Aug 12, 2007 1:22 pm 
			
			
			
			
			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  
  please. 
Thanks
PureBasicien tu es, PureBasicien tu resteras.
						 
		 
				
		
		 
	 
	
						
		
		
			
				
																			
								PBUser 							 
						User 			
		Posts:  20 Joined:  Mon Aug 20, 2007 6:03 pmLocation:  Germany 
		
						
						
						 
													
							
						
									
						Post 
					 
								by PBUser  Mon Aug 20, 2007 6:11 pm 
			
			
			
			
			Hi,
the Lib is great, but if i enable ThreadSafe, i get this error message:
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?
 
		 
				
		
		 
	 
	
						
		
		
			
				
																			
								gnozal 							 
						PureBasic Expert 			
		Posts:  4229 Joined:  Sat Apr 26, 2003 8:27 amLocation:  Strasbourg / France
				Contact: 
				
			 
				
		 
		
						
						
						 
													
							
						
									
						Post 
					 
								by gnozal  Tue Aug 21, 2007 7:42 am 
			
			
			
			
			PBUser wrote: Hi,
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).