I want to encode passwords for UNIX accounts using the crypt function. I'm using pharo 1.0. I tried to install the crypto package from squeakmap, but it gaves me an error and the package seem to get partially installed (categories without class).
How can I get my password crypted? I'm willing to invoke external code, if it is required (and there's a package in SqueakMap that makes the trick in pharo).
Thanks.
Look if you have a category System-Digital Signatures in your image, with a class SecureHashAlgorithm. You can then hash your password as follows:
(SecureHashAlgorithm new hashMessage: 'my password') asString
In Pharo check the category: System-Hashing.
There you have MD5 and SHA.
Classes: SHA1, MD5NonPrimitive, MD5.
Those classes were extracted from the crypto package from squeaksource, and make them work in Pharo. Then MD5 and SHA were integrated in the core.
Cheers
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With