Interface CryptoSession
-
- All Superinterfaces:
java.lang.AutoCloseable,java.io.Closeable
- All Known Implementing Classes:
CryptoProviderSessionChildImpl
public interface CryptoSession extends java.io.CloseableProvides the caller with the ability to perform crypto querying operations for a group of related files.Typically used to query passwords and to add known good passwords to caches for later re-retrieval.
Closing a CryptoSession instance does not invalidate the instance, instead is is a suggestion that the instance should not be used for any further nested sessions.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddSuccessfulPassword(FSRL fsrl, PasswordValue password)Pushes a known good password into a cache for later re-retrieval.voidclose()Closes this session.java.util.Iterator<PasswordValue>getPasswordsFor(FSRL fsrl, java.lang.String prompt)Returns a sequence of passwords (sorted by quality) that may apply to the specified file.booleanisClosed()Returns true if this session has been closed.
-
-
-
Method Detail
-
getPasswordsFor
java.util.Iterator<PasswordValue> getPasswordsFor(FSRL fsrl, java.lang.String prompt)
Returns a sequence of passwords (sorted by quality) that may apply to the specified file.- Parameters:
fsrl-FSRLpath to the password protected fileprompt- optional prompt that may be displayed to a user- Returns:
Iteratorof possible passwords
-
addSuccessfulPassword
void addSuccessfulPassword(FSRL fsrl, PasswordValue password)
Pushes a known good password into a cache for later re-retrieval.- Parameters:
fsrl-FSRLpath to the file that was unlocked by the passwordpassword- the good password
-
isClosed
boolean isClosed()
Returns true if this session has been closed.- Returns:
- boolean true if closed
-
close
void close()
Closes this session.- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable
-
-