[Gambas-user] Using MD5Sum On File
Rob Kudla
sourceforge-raindog2 at ...94...
Sat Nov 10 05:26:00 CET 2012
On 11/09/2012 10:34 PM, Christian DaGeek247 Stephens wrote:
> command button. What I want to do is get the md5sum of the file chosen
> shown in the label when the user clicks the button. I can
> use properties_md5.caption = Crypt.MD5(fchoose.Name) to get a random hash,
> but i want to get the hash of the actual file, and not some random password
> or something. How would I do this in gambas?
If you want your users to be able to compare the hash with the output of md5sum, why not just use md5sum to be sure? It's part of coreutils and should always be installed.
EXEC [ "md5sum", fchoose.Name ] TO properties_md5.caption
(or put it into a temporary variable so you can remove the filename, which should be everything after the first 32 characters.)
Rob
More information about the User
mailing list