[Cryptography Team] Re: Blowfish, BCrypt and Password Hashing
added to Cryptography project.
Germán Arduino
garduino at gmail.com
Sun May 15 13:54:28 UTC 2011
opsss, sorry, hehe, I totally forgot and tried blowfish in an image
without Cryptography installed.
Sorry by the noise (trying to do hundreds of things at the same time
is not good) :)
Cheers.
2011/5/15 Paul DeBruicker <pdebruic at gmail.com>:
> Hi German,
>
> ByteArray>>fromHexString: is an extension defined in the Cryptography-Core
> package. I missed it when I was creating the Blowfish packages. Thanks for
> finding that.
>
>
>
> I've pasted the method below.
>
>
> Paul
>
>
>
>
>
>
>
> ByteArray>>#fromHexString: hexString
> "Returns a byteArray from a hex string. The hex string can have
> leading zeros that will not be truncated, preserving the size of the
> byteArray for things like cyrptograpy"
> | anInteger hexSize stringSize aStringOfHex |
> aStringOfHex := (hexString copyWithoutAll: (Array with: $ with:
> Character cr with: Character tab)).
> stringSize := aStringOfHex size.
> (stringSize > 3
> and: [(aStringOfHex copyFrom: 1 to: 3) = '16r'])
> ifTrue: [anInteger := Number readFrom: (aStringOfHex
> asUppercase at: 3 put: $r;
> yourself).
> hexSize := aStringOfHex size - 3 / 2]
> ifFalse: [anInteger := Number readFrom: aStringOfHex
> asUppercase base: 16.
> hexSize := aStringOfHex size / 2].
> ^ anInteger asByteArrayOfSize: hexSize asInteger
> _______________________________________________
> Cryptography mailing list
> Cryptography at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/cryptography
>
--
=================================================
Germán S. Arduino <gsa @ arsol.net> Twitter: garduino
Arduino Software & Web Hosting http://www.arduinosoftware.com
PasswordsPro http://www.passwordspro.com
=================================================
More information about the Cryptography
mailing list