Package org.iqtig.pseudonymisierung.impl
Class StringPseudonymisatorImpl
- java.lang.Object
-
- org.iqtig.pseudonymisierung.impl.AbstractTool
-
- org.iqtig.pseudonymisierung.impl.AbstractPseudonymisationTool
-
- org.iqtig.pseudonymisierung.impl.StringPseudonymisatorImpl
-
- All Implemented Interfaces:
org.iqtig.pseudonymisierung.api.StringPseudonymisator
public class StringPseudonymisatorImpl extends AbstractPseudonymisationTool implements org.iqtig.pseudonymisierung.api.StringPseudonymisator
- Author:
- Klaus Buchwald, Michael Buckendahl
- See Also:
StringPseudonymisator
-
-
Field Summary
-
Fields inherited from class org.iqtig.pseudonymisierung.impl.AbstractPseudonymisationTool
defaultPrefix, publicKey
-
-
Constructor Summary
Constructors Constructor Description StringPseudonymisatorImpl(Path cerFile)
Erzeugt eine Instanz zum pseudonymisieren von StringsStringPseudonymisatorImpl(Path registrationDir, org.iqtig.pseudonymisierung.beans.CertificateIdentity certificateIdentity)
Erzeugt eine Instanz zum pseudonymisieren von StringsStringPseudonymisatorImpl(Path registrationDir, org.iqtig.pseudonymisierung.beans.CertificateIdentity certificateIdentity, org.iqtig.pseudonymisierung.enums.Method method)
Erzeugt eine Instanz zum pseudonymisieren von StringsStringPseudonymisatorImpl(Path cerFile, org.iqtig.pseudonymisierung.enums.Method method)
Erzeugt eine Instanz zum pseudonymisieren von StringsStringPseudonymisatorImpl(PublicKey publicKey, org.iqtig.pseudonymisierung.beans.CertificateIdentity certificateIdentity)
Erzeugt eine Instanz zum pseudonymisieren von StringsStringPseudonymisatorImpl(PublicKey publicKey, org.iqtig.pseudonymisierung.beans.CertificateIdentity certificateIdentity, org.iqtig.pseudonymisierung.enums.Method method)
Erzeugt eine Instanz zum pseudonymisieren von StringsStringPseudonymisatorImpl(Properties properties)
Erzeugt eine Instanz zum pseudonymisieren von Strings
Die Übergebenen Properties müssen folgende Schüssel-Wert-Paare enthalten:
certificate.datacollectionpoint = Die String-Repräsentation des entsprechendenDataCollectionPoint
certificate.stateCode = Die String-Repräsentation des entsprechendenStateCode
registration.dir = Das Schlüssel-Registrierungsverzeichnis
Zusätzlich kann auch das Pseudonymisierungsverfahren( mit dem Schlüssel "pseu.method") in den Properties enthalten sein.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
encrypt(String toPseudonymisation)
String
encrypt(String toPseudonymisation, String pseudonymisationMethod)
String
encrypt(String toPseudonymisation, org.iqtig.pseudonymisierung.enums.Method pseudonymisationMethod)
List<String>
encrypt(List<String> plainTexts)
String
encryptAsymmetricInternal(String toPseudonymization, Supplier<String> prefixSupplier)
String
encryptInternal(String toPseudonymisation)
String
encryptInternal(String toPseudonymisation, Supplier<String> prefixSupplier)
-
Methods inherited from class org.iqtig.pseudonymisierung.impl.AbstractPseudonymisationTool
getPublicKeyParameter, getPublicKeyPlain
-
Methods inherited from class org.iqtig.pseudonymisierung.impl.AbstractTool
validateProperties, validatePropertiesOr
-
-
-
-
Constructor Detail
-
StringPseudonymisatorImpl
public StringPseudonymisatorImpl(PublicKey publicKey, org.iqtig.pseudonymisierung.beans.CertificateIdentity certificateIdentity) throws org.iqtig.pseudonymisierung.exception.PseudonymisationException
Erzeugt eine Instanz zum pseudonymisieren von Strings- Parameters:
publicKey
-PublicKey
certificateIdentity
-CertificateIdentity
- Throws:
org.iqtig.pseudonymisierung.exception.PseudonymisationException
- wenn ein Fehler aufgetreten ist
-
StringPseudonymisatorImpl
public StringPseudonymisatorImpl(PublicKey publicKey, org.iqtig.pseudonymisierung.beans.CertificateIdentity certificateIdentity, org.iqtig.pseudonymisierung.enums.Method method) throws org.iqtig.pseudonymisierung.exception.PseudonymisationException
Erzeugt eine Instanz zum pseudonymisieren von Strings- Parameters:
publicKey
-PublicKey
certificateIdentity
-CertificateIdentity
method
-Method
- Throws:
org.iqtig.pseudonymisierung.exception.PseudonymisationException
- wenn ein Fehler aufgetreten ist
-
StringPseudonymisatorImpl
public StringPseudonymisatorImpl(Path cerFile) throws org.iqtig.pseudonymisierung.exception.PseudonymisationException
Erzeugt eine Instanz zum pseudonymisieren von Strings- Parameters:
cerFile
-Path
- Throws:
org.iqtig.pseudonymisierung.exception.PseudonymisationException
- wenn das Zertifikat nicht geladen werden kann.
-
StringPseudonymisatorImpl
public StringPseudonymisatorImpl(Path cerFile, org.iqtig.pseudonymisierung.enums.Method method) throws org.iqtig.pseudonymisierung.exception.PseudonymisationException
Erzeugt eine Instanz zum pseudonymisieren von Strings- Parameters:
cerFile
-Path
method
-Method
- Throws:
org.iqtig.pseudonymisierung.exception.PseudonymisationException
- wenn das Zertifikat nicht geladen werden kann.
-
StringPseudonymisatorImpl
public StringPseudonymisatorImpl(Path registrationDir, org.iqtig.pseudonymisierung.beans.CertificateIdentity certificateIdentity) throws org.iqtig.pseudonymisierung.exception.PseudonymisationException
Erzeugt eine Instanz zum pseudonymisieren von Strings- Parameters:
registrationDir
-Path
certificateIdentity
-CertificateIdentity
- Throws:
org.iqtig.pseudonymisierung.exception.PseudonymisationException
- wenn das Zertifikat nicht geladen werden kann.
-
StringPseudonymisatorImpl
public StringPseudonymisatorImpl(Path registrationDir, org.iqtig.pseudonymisierung.beans.CertificateIdentity certificateIdentity, org.iqtig.pseudonymisierung.enums.Method method) throws org.iqtig.pseudonymisierung.exception.PseudonymisationException
Erzeugt eine Instanz zum pseudonymisieren von Strings- Parameters:
registrationDir
-Path
certificateIdentity
-CertificateIdentity
method
-Method
- Throws:
org.iqtig.pseudonymisierung.exception.PseudonymisationException
- wenn das Zertifikat nicht geladen werden kann.
-
StringPseudonymisatorImpl
public StringPseudonymisatorImpl(Properties properties) throws org.iqtig.pseudonymisierung.exception.PseudonymisationException
Erzeugt eine Instanz zum pseudonymisieren von Strings
Die Übergebenen Properties müssen folgende Schüssel-Wert-Paare enthalten:
certificate.datacollectionpoint = Die String-Repräsentation des entsprechendenDataCollectionPoint
certificate.stateCode = Die String-Repräsentation des entsprechendenStateCode
registration.dir = Das Schlüssel-Registrierungsverzeichnis
Zusätzlich kann auch das Pseudonymisierungsverfahren( mit dem Schlüssel "pseu.method") in den Properties enthalten sein.- Parameters:
properties
-Properties
- Throws:
org.iqtig.pseudonymisierung.exception.PseudonymisationException
- wenn das Zertifikat nicht geladen werden kann.
-
-
Method Detail
-
encrypt
public String encrypt(String toPseudonymisation, org.iqtig.pseudonymisierung.enums.Method pseudonymisationMethod) throws org.iqtig.pseudonymisierung.exception.PseudonymisationException
- Specified by:
encrypt
in interfaceorg.iqtig.pseudonymisierung.api.StringPseudonymisator
- Throws:
org.iqtig.pseudonymisierung.exception.PseudonymisationException
-
encrypt
public List<String> encrypt(List<String> plainTexts) throws org.iqtig.pseudonymisierung.exception.PseudonymisationException
- Specified by:
encrypt
in interfaceorg.iqtig.pseudonymisierung.api.StringPseudonymisator
- Throws:
org.iqtig.pseudonymisierung.exception.PseudonymisationException
-
encrypt
public String encrypt(String toPseudonymisation, String pseudonymisationMethod) throws org.iqtig.pseudonymisierung.exception.PseudonymisationException
- Specified by:
encrypt
in interfaceorg.iqtig.pseudonymisierung.api.StringPseudonymisator
- Throws:
org.iqtig.pseudonymisierung.exception.PseudonymisationException
-
encrypt
public String encrypt(String toPseudonymisation) throws org.iqtig.pseudonymisierung.exception.PseudonymisationException
- Specified by:
encrypt
in interfaceorg.iqtig.pseudonymisierung.api.StringPseudonymisator
- Throws:
org.iqtig.pseudonymisierung.exception.PseudonymisationException
-
encryptInternal
public String encryptInternal(String toPseudonymisation) throws org.iqtig.pseudonymisierung.exception.PseudonymisationException
- Specified by:
encryptInternal
in interfaceorg.iqtig.pseudonymisierung.api.StringPseudonymisator
- Throws:
org.iqtig.pseudonymisierung.exception.PseudonymisationException
-
encryptInternal
public String encryptInternal(String toPseudonymisation, Supplier<String> prefixSupplier) throws org.iqtig.pseudonymisierung.exception.PseudonymisationException
- Specified by:
encryptInternal
in interfaceorg.iqtig.pseudonymisierung.api.StringPseudonymisator
- Throws:
org.iqtig.pseudonymisierung.exception.PseudonymisationException
-
-