EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Handeling Invalid PassPhrase TElPGPWriter OnKeyPassphrase Event

Posted: 06/13/2013 07:54:13
by Ed Scott (Basic support level)
Joined: 06/13/2013
Posts: 1

I have an instance where my PassPhrase is invalid.

I have wired up

myWriter.OnKeyPassphrase += new SBPGPStreams.TSBPGPKeyPassphraseEvent(myPassPhraseEvent_OnKeyPassphrase);

My method myPassPhraseEvent_OnKeyPassphrase is called when I Run the Sign method.

If the passphrase is correct the myPassPhraseEvent_OnKeyPassphrase never gets fired again, which is great, but if the passphrase fails the myPassPhraseEvent_OnKeyPassphrase fires over and over.

I can put a counter in myPassPhraseEvent_OnKeyPassphrase so if > 1 I know it must have failed. I am wondering is that the best way to handel this?

Thanks, Ed
Posted: 06/13/2013 07:59:20
by Mykola Olshevsky (Basic support level)
Joined: 07/07/2005
Posts: 442

Hi. Yes, that's correct approach - PGPWriter doesn't care how much times event will be fired, you control it by setting Cancel to true.



Topic viewed 1002 times

Number of guests: 1, registered members: 0, in total hidden: 0


Back to top

As of July 15, 2016 EldoS business operates as a division of /n software, inc. For more information, please read the announcement.

Got it!