MD5 procedures and PB > 5.31

Share your advanced PureBasic knowledge/code with the community.
infratec
Always Here
Always Here
Posts: 7620
Joined: Sun Sep 07, 2008 12:45 pm
Location: Germany

MD5 procedures and PB > 5.31

Post by infratec »

Hi,

since some code still use the MD5 procedures, here is a workaround:

Code: Select all

CompilerIf #PB_Compiler_Version > 531
  UseMD5Fingerprint()
  
  Macro MD5Fingerprint(Line, StringByteLength)
    Fingerprint(Line, StringByteLength, #PB_Cipher_MD5)
  EndMacro
  
  Macro MD5FileFingerprint(Filename, Offset=-1, Length=-1)
    FileFingerprint(Filename, #PB_Cipher_MD5, 0, Offset, Length)
  EndMacro
  
CompilerEndIf
Bernd