EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Handeling Invalid PassPhrase TElPGPWriter OnKeyPassphrase Event

Also by EldoS: CallbackFilter
A component to monitor and control disk activity, track file and directory operations (create, read, write, rename etc.), alter file data, encrypt files, create virtual files.
#25273
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
#25274
Posted: 06/13/2013 07:59:20
by Mykola Olshevsky (Basic support level)
Joined: 07/07/2005
Posts: 450

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.

Reply

Statistics

Topic viewed 938 times

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




|

Back to top

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

Got it!