[BUG] RSAEncryptionScheme>>decode:parameter: MsgNotUndrstd:
SmallInteger>>asByteArraOfSize:
Jack Keel
jhkeel at facstaff.wisc.edu
Sun Apr 11 18:12:42 UTC 2004
Hi,
I tried the example of using RSA in the Cryptography package in Squeak
3.6 and get a MessageNotUnderstood SmallInteger>>asByteArrayOfSize:.
The asByteArrayOfSize: method is used in
RSAEncryptionScheme>>encode:parameter:length: , decode:parameter: and
maskOfLength:fromString:
I looked in a few older releases of Squeak but can not find
asByteArrayOfSize: I also looked in RSA.cs (circa 1999) and
RSArevisited-lc.cs on Luciano Notarfrancesco's home site and they don't
use asByteArrayOfSize but they also don't seem to contain much of the
same code that is currently on SqueakMap. Is anybody familiar with the
code for this method and in which Class it was actually implemented?
The unit test of RSA works but it only tests encoding a number not a
string.
Thanks,
Jack
The example I used (as directly extracted from the comments):
rsa _ RSAKeyPairGenerator new.
rsa bits: 1024.
pub _ rsa publicKey.
priv _ rsa privateKey.
rsaes _ RSAEncryptionScheme new.
rsaes setPublicKey: pub privateKey: priv parameter: 'p'.
c _ rsaes encrypt: 'hola'.
rsaes decrypt: c.
And an example of how the missing method is used:
pHash _ (hash hashMessage: parameter) asByteArrayOfSize: hashLen.
More information about the Squeak-dev
mailing list
|