ProtectedProductSerialNumber class>>instanceEncodingKey missing

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Ted
Reply | Threaded
Open this post in threaded view
|

ProtectedProductSerialNumber class>>instanceEncodingKey missing

Ted
Hi,

This class has seen some changes in version 6 which causes subclasses
now to require the #instanceEncodingKey class method. The encoded
scribble example uses the MyCompanySerialNumber class which doesn't have
this method and therefore doesn't work anymore.

Am I right in thinking that the instance method #encodingKey just needs
to be moved to the class side? (it seems to work)

Thanks,

Ted


Ted
Reply | Threaded
Open this post in threaded view
|

Re: ProtectedProductSerialNumber class>>instanceEncodingKey missing

Ted
Ted wrote:
>
> Am I right in thinking that the instance method #encodingKey just needs
> to be moved to the class side? (it seems to work)

Well, actually it doesn't work ...

>
> Thanks,
>
> Ted


Ted
Reply | Threaded
Open this post in threaded view
|

PC1SerialNumberProtector does not seem to work (was: ProtectedProductSerialNumber class>>instanceEncodingKey missing)

Ted
In reply to this post by Ted
On further investigation, I copied the methods from
AnotherCompanySerialNumber and managed to get it to work, however the
unlock key was about a mile long so I tried to change the coding from
Elgamal back to PC1 by changing the serialNumberProtectorClass. Of
course this required different #instanceEncodingKey/#instanceDecodingKey.
In D5 the encoding was generated from
        (PC1Cipher withStrength: 56) key
but this failed as PC1SerialNumberProtector>>encrypt: requires an
integer instead of a byte array. So I changed the instance encoding into
        LargeInteger fromBytes: (PC1Cipher withStrength: 56) key.
This did generate a key, but then the decoding failed:

testValidLicence
        | key no |
        key := MyCompanySerialNumber new.
        no := key productId.
        self assert: (MyCompanySerialNumber fromString: (key displayString))
productId = no.

So I guess I'm still misusing something but I'm really stuck now.

Can anybody shed some light on this?

Thanks,

Ted


Reply | Threaded
Open this post in threaded view
|

Re: ProtectedProductSerialNumber class>>instanceEncodingKey missing

Chris Uppal-3
In reply to this post by Ted
[posted here because I suspect that my email is being eaten somewhere]

Andy,

Did you get my (longish) email about this ?

    -- chris


Reply | Threaded
Open this post in threaded view
|

Re: ProtectedProductSerialNumber class>>instanceEncodingKey missing

Andy Bower-3
Chris,

> Did you get my (longish) email about this ?

Yes. I've recorded the issue as #2090 and we'll attempt to patch it up
for the next Live Update.

Best regards

--
Andy Bower
Dolphin Support
www.object-arts.com