Class CachedPasswordProvider
java.lang.Object
ghidra.formats.gfilesystem.crypto.CachedPasswordProvider
- All Implemented Interfaces:
CryptoProvider,PasswordProvider
Caches passwords used to unlock a file.
Threadsafe.
-
Nested Class Summary
Nested classes/interfaces inherited from interface ghidra.formats.gfilesystem.crypto.CryptoProvider
CryptoProvider.Session -
Constructor Summary
Constructors -
Method Summary
ChangeModifier and TypeMethodDescriptionNEWvoidaddPassword(FSRL fsrl, Password password) Adds a password / file combo to the cache.voidRemove all cached information.intgetCount()Returns the number of items in cacheMODIFIEDgetPasswordsFor(FSRL fsrl, String prompt, CryptoProvider.Session session) Returns a sequence of passwords (ordered by quality) that may apply to the specified file.REMOVEDvoidaddPassword(FSRL fsrl, PasswordValue password) Removed
-
Constructor Details
-
CachedPasswordProvider
public CachedPasswordProvider()
-
-
Method Details
-
addPassword NEW
Adds a password / file combo to the cache. -
clearCache
public void clearCache()Remove all cached information. -
getCount
public int getCount()Returns the number of items in cache- Returns:
- number of items in cache
-
getPasswordsFor MODIFIED
return type: Iterator → Iterator-java.util.Iterator<ghidra.formats.gfilesystem.crypto.PasswordValue> getPasswordsFor(ghidra.formats.gfilesystem.FSRL fsrl, java.lang.String prompt, ghidra.formats.gfilesystem.crypto.CryptoProvider.Session session)+java.util.Iterator<ghidra.framework.generic.auth.Password> getPasswordsFor(ghidra.formats.gfilesystem.FSRL fsrl, java.lang.String prompt, ghidra.formats.gfilesystem.crypto.CryptoProvider.Session session)Description copied from interface:PasswordProviderReturns a sequence of passwords (ordered by quality) that may apply to the specified file.- Specified by:
getPasswordsForin interfacePasswordProvider- Parameters:
fsrl-FSRLpath to the password protected fileprompt- optional prompt that may be displayed to a usersession- a place to hold state values that persist across related queries- Returns:
Iteratorof possible passwords
-