Implement IBlob - WeOnlyDo Discussion board

Implement IBlob (General questions)

by Nik, Tuesday, May 18, 2010, 12:10 (5302 days ago)

Hi

I try to implement IBlob by my own class KeyBlob, realized in VB6. The goal is to set: locCrypt.SecretKey = myKBlob.

KeyBlob stores an array: myArray(31) as Byte (Zero-based, means 0 to 31 = size of 32)

While setting .SecretKey, this invokes Private Function Blob_Seek twice: once with (Offset=0, Origin=2) and (Offset=0, Origin=0).

I thought, this is wodCrypt's way to detect the bounderies. But it crashes in both cases: giving back 31/0 or 32/1.

So I have obviously a misunderstandig. What values (VB-Long) are expected from wodCrypt at this moment?

Thanks much for any help.
Nik

Re: Implement IBlob

by wodDamir, Tuesday, May 18, 2010, 13:06 (5302 days ago) @ Nik

Hi Nik,

As you can see from here: http://www.weonlydo.com/Crypt/Help/WODCRYPTLib~Blob~Seek.html, Seek method expects the Offset (position) where the to move the pointer to, and Origin which tells from where to move.

Perhaps the above link will provide more information.

However, why not simply use MemBlob or FileBlob objects instead?

regards,
Damba

Re: Implement IBlob

by nik, Tuesday, May 18, 2010, 14:20 (5302 days ago) @ wodDamir

Hi Damba

Thanks for reply.
Out of an advice by email, I understood to have to put a IBlob object into .SecretKey. With your reply I realized, that each derivate like MemBlob or FileBlob was ment...

...and, of course, it runs. Sorry, I went too far.

Regards,
Nik

Re: Implement IBlob

by wodDamir, Tuesday, May 18, 2010, 14:23 (5302 days ago) @ nik

Nik,

No problems. I'm just glad it works.

Regards,
Damba