N. McA.
N. McA.

Reputation: 4946

LockBox Stream read error, RSA

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?

Upvotes: 1

Views: 592

Answers (1)

David Heffernan
David Heffernan

Reputation: 613013

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.

Upvotes: 4

Related Questions