STARGÅTE wrote:Little John wrote:Howevr, IMHO PB's built-in MD5Fingerprint() function just should provide the option to pass a format parameter.
Then it wouldn't be necessary for us to write a wrapper in order to get this important option.
( But this is a feature request by me. I can't see a bug here. )
The MD5Fingerprint() is a function for a
memory buffer (not directly for strings!).
So, it is not the job of this
memory function to "change" the format of the buffer.
That's why
Little John wrote:( But this is a feature request by me. I can't see a bug here. )
My feature request was to extend the functionality of PB's MD5Fingerprint() function.
STARGÅTE wrote:This is also a rule for all other functions such as:
CRC32Fingerprint, SHA1Fingerprint, AESDecoder, AESEncoder, Base64Decoder, Base64Encoder and so on.
Yes, I know.
And we also know, that people post the same problems with these functions here on the forum again and again for years.
Why not extend those functions, in order to make them more flexible?
STARGÅTE wrote:It's a bad habit to use strings as memory buffer.
I think it depends on the context.
In some cases it's certainly a bad idea (e.g. when the buffer contains zeros), in other cases it might have its advantages.
If it is actually a bad habit, then at least examples for doing so should be removed from the PB docs.

E.g.:
http://www.purebasic.com/documentation/ ... coder.html
http://www.purebasic.com/documentation/ ... coder.html
http://www.purebasic.com/documentation/ ... print.html
(These examples are showing
incorrect use of strings as buffers!)
BTW: For important stuff, it's best not to use MD5 at all.
http://www.purebasic.fr/english/viewtop ... 37&t=61364