Class PinEntry
java.lang.Object
org.codehaus.plexus.components.secdispatcher.PinEntry
Inspired by A peek inside pinentry.
Also look at Pinentry Documentation.
Finally, source mirror is at gpg/pinentry.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
static final record
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionconfirm()
Initiates a "confirmation" dialogue (no input) using previously set options.Usable withgetPin()
, window will contain two input fields and will force user to type in same input in both fields, ie to "confirm" the pin.getPin()
Initiates a "get pin" dialogue with input field(s) using previously set options.static void
message()
Initiates a "message" dialogue (no input) using previously set options.Sets the CANCEL button label, by default "Cancel".setDescription
(String desc) Sets additional test in window.If set, window will show "Error: xxx", usable for second attempt (ie "bad password").setKeyInfo
(String keyInfo) Sets a "stable key handle" for caching purposes.Sets the OK button label, by default "Ok".Sets the prompt.setTimeout
(Duration timeout) Sets the window timeout, if no button pressed and timeout passes, Result will byPinEntry.Outcome.TIMEOUT
.Sets the window title.
-
Constructor Details
-
PinEntry
Creates pin entry instance that will use the passed in cmd executable.
-
-
Method Details
-
setKeyInfo
Sets a "stable key handle" for caching purposes. Optional. -
setOk
Sets the OK button label, by default "Ok". -
setCancel
Sets the CANCEL button label, by default "Cancel". -
setTitle
Sets the window title. -
setDescription
Sets additional test in window. -
setPrompt
Sets the prompt. -
setError
If set, window will show "Error: xxx", usable for second attempt (ie "bad password"). -
confirmPin
Usable withgetPin()
, window will contain two input fields and will force user to type in same input in both fields, ie to "confirm" the pin. -
setTimeout
Sets the window timeout, if no button pressed and timeout passes, Result will byPinEntry.Outcome.TIMEOUT
. -
getPin
Initiates a "get pin" dialogue with input field(s) using previously set options.- Throws:
IOException
-
confirm
Initiates a "confirmation" dialogue (no input) using previously set options.- Throws:
IOException
-
message
Initiates a "message" dialogue (no input) using previously set options.- Throws:
IOException
-
main
- Throws:
IOException
-