Class 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
    • 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 entsprechenden DataCollectionPoint
        certificate.stateCode = Die String-Repräsentation des entsprechenden StateCode
        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 interface org.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 interface org.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 interface org.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 interface org.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 interface org.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 interface org.iqtig.pseudonymisierung.api.StringPseudonymisator
        Throws:
        org.iqtig.pseudonymisierung.exception.PseudonymisationException
      • encryptAsymmetricInternal

        public String encryptAsymmetricInternal​(String toPseudonymization,
                                                Supplier<String> prefixSupplier)
                                         throws org.iqtig.pseudonymisierung.exception.PseudonymisationException
        Throws:
        org.iqtig.pseudonymisierung.exception.PseudonymisationException