This is an automated email from the ASF dual-hosted git repository.

rcordier pushed a commit to branch postgresql
in repository https://gitbox.apache.org/repos/asf/james-project.git

commit 9a75315d5e9008c5734098745a7f18c17cc75e56
Author: Benoit TELLIER <[email protected]>
AuthorDate: Fri Nov 10 10:53:24 2023 +0100

    JAMES-2586 Drop unused class: EncryptDecryptHelper
---
 .../mail/model/openjpa/EncryptDecryptHelper.java   | 66 ----------------------
 1 file changed, 66 deletions(-)

diff --git 
a/mailbox/postgres/src/main/java/org/apache/james/mailbox/postgres/mail/model/openjpa/EncryptDecryptHelper.java
 
b/mailbox/postgres/src/main/java/org/apache/james/mailbox/postgres/mail/model/openjpa/EncryptDecryptHelper.java
deleted file mode 100644
index ef8eb9c403..0000000000
--- 
a/mailbox/postgres/src/main/java/org/apache/james/mailbox/postgres/mail/model/openjpa/EncryptDecryptHelper.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/****************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one   *
- * or more contributor license agreements.  See the NOTICE file *
- * distributed with this work for additional information        *
- * regarding copyright ownership.  The ASF licenses this file   *
- * to you under the Apache License, Version 2.0 (the            *
- * "License"); you may not use this file except in compliance   *
- * with the License.  You may obtain a copy of the License at   *
- *                                                              *
- *   http://www.apache.org/licenses/LICENSE-2.0                 *
- *                                                              *
- * Unless required by applicable law or agreed to in writing,   *
- * software distributed under the License is distributed on an  *
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY       *
- * KIND, either express or implied.  See the License for the    *
- * specific language governing permissions and limitations      *
- * under the License.                                           *
- ****************************************************************/
-package org.apache.james.mailbox.postgres.mail.model.openjpa;
-
-import org.jasypt.encryption.pbe.StandardPBEByteEncryptor;
-
-/**
- * Helper class for encrypt and de-crypt data
- * 
- *
- */
-public class EncryptDecryptHelper {    
-
-    // Use one static instance as it is thread safe
-    private static final StandardPBEByteEncryptor encryptor = new 
StandardPBEByteEncryptor();
-    
-    
-    /**
-     * Set the password for encrypt / de-crypt. This MUST be done before
-     * the usage of {@link #getDecrypted(byte[])} and {@link 
#getEncrypted(byte[])}.
-     * 
-     * So to be safe its the best to call this in a constructor
-     * 
-     * @param pass
-     */
-    public static void init(String pass) {
-        encryptor.setPassword(pass);
-    }
-
-    /**
-     * Encrypt the given array and return the encrypted one
-     * 
-     * @param array
-     * @return enc-array
-     */
-    public static byte[] getEncrypted(byte[] array) {
-        return encryptor.encrypt(array);
-    }
-
-    /**
-     * Decrypt the given array and return the de-crypted one
-     * 
-     * @param array
-     * @return dec-array
-     */
-    public static byte[] getDecrypted(byte[] array) {
-        return encryptor.decrypt(array);
-    }
-
-}


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to