Class AbstractFormat
- java.lang.Object
-
- org.kapott.hbci.passport.storage.format.AbstractFormat
-
- All Implemented Interfaces:
PassportFormat
- Direct Known Subclasses:
AESFormat
,LegacyFormat
public abstract class AbstractFormat extends java.lang.Object implements PassportFormat
Abstrakte Basis-Klasse der Formate.
-
-
Constructor Summary
Constructors Constructor Description AbstractFormat()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected javax.crypto.Cipher
getCipher()
Liefert den zu verwendenden Cipher.protected abstract java.lang.String
getCipherAlg()
Liefert den zu verwendenden Cipher-Algorithmus.protected char[]
getPassword(HBCIPassport passport, boolean forSaving)
Fragt den User per Callback nach dem Passwort fuer die Passport-Datei.boolean
supported()
Testet, ob das Format auf dem System unterstuetzt wird.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.kapott.hbci.passport.storage.format.PassportFormat
load, save
-
-
-
-
Method Detail
-
supported
public boolean supported()
Description copied from interface:PassportFormat
Testet, ob das Format auf dem System unterstuetzt wird.- Specified by:
supported
in interfacePassportFormat
- Returns:
- true, wenn es unterstuetzt wird.
- See Also:
PassportFormat.supported()
-
getCipher
protected javax.crypto.Cipher getCipher() throws java.security.GeneralSecurityException
Liefert den zu verwendenden Cipher.- Returns:
- der zu verwendende Cipher.
- Throws:
java.security.GeneralSecurityException
-
getCipherAlg
protected abstract java.lang.String getCipherAlg()
Liefert den zu verwendenden Cipher-Algorithmus.- Returns:
- der zu verwendende Cipher-Algorithmus.
-
getPassword
protected char[] getPassword(HBCIPassport passport, boolean forSaving) throws java.security.GeneralSecurityException
Fragt den User per Callback nach dem Passwort fuer die Passport-Datei.- Parameters:
passport
- der Passport.forSaving
- true, wenn das Passwort zum Speichern erfragt werden soll.- Returns:
- das Passwort.
- Throws:
java.security.GeneralSecurityException
- wenn das Passwort nicht ermittelt werden konnte.
-
-