System-Hashing and SecureHashAlgorithm ?
Yes but it doesn't look like compatible. I replaced the call by SHA1 new hashMessage: 'azerty' and this gives a ByteArray where SecureHashAlgorithm in 1.4 gives a stirng apparently. I'll look in a 1.4 Phil On Wed, May 7, 2014 at 4:08 PM, Esteban Lorenzano <estebanlm@gmail.com>wrote:
it is SHA1 (a class in pharo-core)
On 07 May 2014, at 16:06, phil@highoctane.be wrote:
Where is that package gone ?
It is a dependency of StdMySql.
TIA Phil
#asString ? #hex ? BTW, the result of hashing *is* always binary ... On 07 May 2014, at 16:20, phil@highoctane.be wrote:
Yes but it doesn't look like compatible.
I replaced the call by SHA1 new hashMessage: 'azerty' and this gives a ByteArray where SecureHashAlgorithm in 1.4 gives a stirng apparently.
I'll look in a 1.4
Phil
On Wed, May 7, 2014 at 4:08 PM, Esteban Lorenzano <estebanlm@gmail.com> wrote: it is SHA1 (a class in pharo-core)
On 07 May 2014, at 16:06, phil@highoctane.be wrote:
Where is that package gone ?
It is a dependency of StdMySql.
TIA Phil
On Wed, May 7, 2014 at 4:34 PM, Sven Van Caekenberghe <sven@stfx.eu> wrote:
#asString ? #hex ?
BTW, the result of hashing *is* always binary ...
I filed out the old one from the 1.4 image and there is a different implementation... sha1 := SecureHashAlgorithm new. hashStage1 := sha1 hashMessage: password. hashStage1 is a LargePositiveInteger... Quite different thing. Phil
On 07 May 2014, at 16:20, phil@highoctane.be wrote:
Yes but it doesn't look like compatible.
I replaced the call by SHA1 new hashMessage: 'azerty' and this gives a ByteArray where SecureHashAlgorithm in 1.4 gives a stirng apparently.
I'll look in a 1.4
Phil
On Wed, May 7, 2014 at 4:08 PM, Esteban Lorenzano <estebanlm@gmail.com> wrote: it is SHA1 (a class in pharo-core)
On 07 May 2014, at 16:06, phil@highoctane.be wrote:
Where is that package gone ?
It is a dependency of StdMySql.
TIA Phil
On 07 May 2014, at 16:43, phil@highoctane.be wrote:
On Wed, May 7, 2014 at 4:34 PM, Sven Van Caekenberghe <sven@stfx.eu> wrote: #asString ? #hex ?
BTW, the result of hashing *is* always binary ...
I filed out the old one from the 1.4 image and there is a different implementation...
sha1 := SecureHashAlgorithm new. hashStage1 := sha1 hashMessage: password.
hashStage1 is a LargePositiveInteger...
Quite different thing.
yes, but it was wrong :) Esteban
Phil
On 07 May 2014, at 16:20, phil@highoctane.be wrote:
Yes but it doesn't look like compatible.
I replaced the call by SHA1 new hashMessage: 'azerty' and this gives a ByteArray where SecureHashAlgorithm in 1.4 gives a stirng apparently.
I'll look in a 1.4
Phil
On Wed, May 7, 2014 at 4:08 PM, Esteban Lorenzano <estebanlm@gmail.com> wrote: it is SHA1 (a class in pharo-core)
On 07 May 2014, at 16:06, phil@highoctane.be wrote:
Where is that package gone ?
It is a dependency of StdMySql.
TIA Phil
<SecureHashAlgorithm.st>
I had the same problem. I added the following to my compatibility package. In Pharo now I do: shaHashMessage: aString "this method hashes aString using a SHA1 (SecureHashAlgorithm) method. Returns an integer" ^ (SHA1 new hashStream: aString readStream) asInteger (which works in 2.0 and 3.0) and in gemstone I do: shaHashMessage: aString "this method hashes aString using a SHA1 (SecureHashAlgorithm) method. Returns an integer" ^ SecureHashAlgorithm new hashMessage: aString On Wed, May 7, 2014 at 12:17 PM, Sven Van Caekenberghe <sven@stfx.eu> wrote:
On 07 May 2014, at 16:43, phil@highoctane.be wrote:
hashStage1 is a LargePositiveInteger...
Quite different thing.
No, not really
123 asByteArrayOfSize: 4
#[0 0 0 123]
#[0 0 0 123] asInteger
123
-- Mariano http://marianopeck.wordpress.com
Where to put it? PharoExtras? Elsewhere?
I think that this is important to PharoExtras is a nice place and after we can set up a ci job for it. Stef
Le 7 mai 2014 20:09, "stepharo" <stepharo@free.fr <mailto:stepharo@free.fr>> a écrit :
Phil
once you find a solution please update the MySql
Stef
On 7/5/14 16:06, phil@highoctane.be <mailto:phil@highoctane.be> wrote:
Where is that package gone ?
It is a dependency of StdMySql.
TIA Phil
participants (5)
-
Esteban Lorenzano -
Mariano Martinez Peck -
phil@highoctane.be -
stepharo -
Sven Van Caekenberghe