Hello,
Does anybody know if VisualAge for Smalltalk contains an implementation of the SHA1 secure hash algorithm? I found the "internal" class SstShaEngine but this seems to be only a partial implementation.
Regards,
Jan van de Sandt.
Moderators: Eric Clayberg, wembley, tc, Diane Engles, solveig
| sha1Func hmacFunc key message digest digestLen |
sha1Func := PlatformFunction fromArray: #('C' 'EVP_sha1' nil 'CRYPTO_LIB' #() #pointer).
hmacFunc := PlatformFunction fromArray: #('C' 'HMAC' nil 'CRYPTO_LIB' #(#pointer #pointer #int32 #pointer #int32 #pointer #pointer) #pointer).
key := 'our-secret' asByteArray.
message := 'Smalltalk is Cool!' asByteArray.
digest := ByteArray new: 20.
digestLen := ByteArray new: 4.
hmacFunc callWith: sha1Func call
with: key
with: key size
with: message
with: message size
with: digest
with: digestLen.
digest
wembley wrote:Jan and Nicolas -
What functionality that you need is missing from SstShaEngine?
Thomas Holzer wrote:wembley wrote:Jan and Nicolas -
What functionality that you need is missing from SstShaEngine?
Hello John,
I think, the SstShaEngine class should be in an own application. Like the AbtMD5Engine is. Because if someone wants to use only the SHA features without SST, he is forced to use all the SST RMI classes, which are not needed.
Regards Thomas
Return to VA Smalltalk 7.0, 7.5 & 8.0
Users browsing this forum: Yahoo [Bot] and 1 guest