Hi
When I use the StringFingerPrint() function the hexidecimal values are in lower case but if I use the Hex() function they are in upper case. Should they not both be in upper case?
Thanks,
Simon
Why are Hex values in lower case in StringFingerprint()?
Why are Hex values in lower case in StringFingerprint()?
Simon White
dCipher Computing
dCipher Computing
- NicTheQuick
- Addict
- Posts: 1227
- Joined: Sun Jun 22, 2003 7:43 pm
- Location: Germany, Saarbrücken
- Contact:
Re: Why are Hex values in lower case in StringFingerprint()?
Why is this relevant for you? I see no problem with that, just a little inconsistency.
The english grammar is freeware, you can use it freely - But it's not Open Source, i.e. you can not change it or publish it in altered way.
Re: Why are Hex values in lower case in StringFingerprint()?
Most of the time hash values are written with lowercase characters but of course uppercase is also valid.
Personally I wish Hex() would also return a lowercase result.
For me lowercase hex strings are easier to read.
Personally I wish Hex() would also return a lowercase result.
For me lowercase hex strings are easier to read.
Windows (x64)
Raspberry Pi OS (Arm64)
Raspberry Pi OS (Arm64)
Re: Why are Hex values in lower case in StringFingerprint()?
You can use the LCase and UCase functions to change the result to how you want it.
Code: Select all
UseMD5Fingerprint()
Macro MD5(string)
UCase(StringFingerprint(string, #PB_Cipher_MD5))
EndMacro
Debug MD5("yourpassword")
Re: Why are Hex values in lower case in StringFingerprint()?
I am searching a database of hashes created by another software product and all their hashes use upper case so my sql commands from PB failed to find a match because PB used lower cases values. So I now changed my PB code so that the hashes are converted to upper case and the search works now.NicTheQuick wrote:Why is this relevant for you? I see no problem with that, just a little inconsistency.
Simon
Simon White
dCipher Computing
dCipher Computing
Re: Why are Hex values in lower case in StringFingerprint()?
If all your entries in the database are uppercase, you could also change your SQL statement to search them as lowercase...
Or like PB's UCASE command, you could do the same in your SQL statement..
Code: Select all
select * from whatever_table where lower(whatever_field) = 'a1b2c3';
Or like PB's UCASE command, you could do the same in your SQL statement..
Code: Select all
select * from whatever_table where whatever_field = upper('a1b2c3');