Class FileHelper
- java.lang.Object
-
- org.iqtig.pseudonymisierung.impl.helper.FileHelper
-
public class FileHelper extends Object
Helfer-Klasse für lese und Schreibzugriffe- Author:
- Michael Buckendahl
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Path
generatFile(Date notBefore, Path path, org.iqtig.pseudonymisierung.beans.CertificateIdentity identity, String fileExtension)
Erzeugt aus dem NotBefore Datum eines Zertifikas und derCertificateIdentity
einenPath
.static X509Certificate
readCertificate(Path certificate)
Liest ein Zertifkat ein.static KeyStore
readPkcs12KeyStore(Path pkcs12file, String password)
Liste einenKeyStore
aus einer PKCS12-Datei.
-
-
-
Method Detail
-
generatFile
public static Path generatFile(Date notBefore, Path path, org.iqtig.pseudonymisierung.beans.CertificateIdentity identity, String fileExtension)
Erzeugt aus dem NotBefore Datum eines Zertifikas und derCertificateIdentity
einenPath
.
-
readCertificate
public static X509Certificate readCertificate(Path certificate) throws org.iqtig.pseudonymisierung.exception.PseudonymisationException
Liest ein Zertifkat ein.- Parameters:
certificate
-Path
- Returns:
X509Certificate
- Throws:
org.iqtig.pseudonymisierung.exception.PseudonymisationException
- im Fehlerfall
-
readPkcs12KeyStore
public static KeyStore readPkcs12KeyStore(Path pkcs12file, String password) throws KeyStoreLoadException, KeyStorePasswordException
Liste einenKeyStore
aus einer PKCS12-Datei.- Parameters:
pkcs12file
-Path
der Dateipassword
-String
Das Passwort mit dem das Zertifikat verschlüsselt wurde.- Returns:
KeyStore
- Throws:
KeyStoreLoadException
- wenn Fehler beim Laden des KeystoresKeyStorePasswordException
- wenn Passwort falsch gesetzt ist
-
-