Evaluate: (UUID fromString: '0608b9dc-02e4-4dd0-9f8a-ea45160df641') asByteArray = (ByteArray fromHexString: '0608B9DC02E44DD09F8AEA45160DF641'). Francis Erik Stel wrote
Hi Francis,
You write: Pharo Smalltalk Users mailing list wrote
FIY
UUID new asByteArray
does not give a ByteArray because UUID is a subclass of ByteArray and asByteArray returns self (Entering teacher mode) This actually means that "UUID new asByteArray" does answer a ByteArray. It will answer (as you mentioned correctly) itself. Since a UUID is a ByteArray it means it will answer a ByteArray (in contrary to your statement).
To put it differently: The inheritance relation (UUID being a subclass of ByteArray) is a "IS-A" relation. So any UUID is a ByteArray.
This means however the message "asByteArray" did not have to be send of course (it is already a ByteArray). I was not sure the class UUID was actually a subclass of ByteArray when writing my reply. Turns out it is.
Cheers, Erik
-- View this message in context: http://forum.world.st/Validate-password-with-PBKDF2-tp4952973p4953174.html Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.