LockBox Stream read error, RSA

582 Views Asked by At

I'm loading a RSA key from a stream and getting an "Stream Read" error? What's the first thing I should try to get my code working?

1

There are 1 best solutions below

0
On BEST ANSWER

Bit of a wild guess, but this can happen if the stream's position is not reset to 0 when you try to read from the stream, after having written to it. Try setting

SigStore.Position := 0;

immediately before using the stream to encrypt.