Commits

Sebastian Sdorra  committed a5dc1c7

mark never used HashBuilder and its implementation as deprecated

  • Participants
  • Parent commits 855e9f9

Comments (0)

Files changed (5)

File scm-core/src/main/java/sonia/scm/security/HashBuilder.java

  */
 
 
+
 package sonia.scm.security;
 
+//~--- non-JDK imports --------------------------------------------------------
+
+import org.apache.shiro.crypto.hash.SimpleHash;
+
 /**
  *
  * @author Sebastian Sdorra
  * @since 1.13
+ * @deprecated use {@link SimpleHash} instead.
  */
 public interface HashBuilder
 {

File scm-core/src/main/java/sonia/scm/security/MD5HashBuilder.java

  */
 
 
+
 package sonia.scm.security;
 
+//~--- non-JDK imports --------------------------------------------------------
+
+import org.apache.shiro.crypto.hash.Md5Hash;
+
 /**
  *
  * @author Sebastian Sdorra
+ * @since 1.13
+ * @deprecated use {@link Md5Hash} instead.
  */
 public class MD5HashBuilder extends MessageDigestHashBuilder
 {
    * @param appendSalt
    */
   public MD5HashBuilder(String value, byte[] salt, int iterations,
-                        boolean appendSalt)
+    boolean appendSalt)
   {
     super(DIGEST, value, salt, iterations, appendSalt, false);
   }
    * @param enableLabel
    */
   public MD5HashBuilder(String value, byte[] salt, int iterations,
-                        boolean appendSalt, boolean enableLabel)
+    boolean appendSalt, boolean enableLabel)
   {
     super(DIGEST, value, salt, iterations, appendSalt, enableLabel);
   }

File scm-core/src/main/java/sonia/scm/security/MessageDigestHashBuilder.java

 
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
+import org.apache.shiro.crypto.hash.SimpleHash;
 
 /**
  *
  * @author Sebastian Sdorra
  * @since 1.13
+ * @deprecated use {@link SimpleHash} instead.
  */
 public class MessageDigestHashBuilder implements HashBuilder
 {

File scm-core/src/main/java/sonia/scm/security/SHA1HashBuilder.java

  */
 
 
+
 package sonia.scm.security;
 
+//~--- non-JDK imports --------------------------------------------------------
+
+import org.apache.shiro.crypto.hash.Sha1Hash;
+
 /**
  *
  * @author Sebastian Sdorra
  * @since 1.13
+ * @deprecated use {@link Sha1Hash} instead.
  */
 public class SHA1HashBuilder extends MessageDigestHashBuilder
 {
    * @param appendSalt
    */
   public SHA1HashBuilder(String value, byte[] salt, int iterations,
-                         boolean appendSalt)
+    boolean appendSalt)
   {
     super(DIGEST, value, salt, iterations, appendSalt, false);
   }
    * @param iterations
    * @param appendSalt
    * @param enableLable
+   * @param enableLabel
    */
   public SHA1HashBuilder(String value, byte[] salt, int iterations,
-                         boolean appendSalt, boolean enableLabel)
+    boolean appendSalt, boolean enableLabel)
   {
     super(DIGEST, value, salt, iterations, appendSalt, enableLabel);
   }

File scm-core/src/main/java/sonia/scm/security/SHA512HashBuilder.java

  */
 
 
+
 package sonia.scm.security;
 
+//~--- non-JDK imports --------------------------------------------------------
+
+import org.apache.shiro.crypto.hash.Sha512Hash;
+
 /**
  *
  * @author Sebastian Sdorra
  * @since 1.13
+ * @deprecated use {@link Sha512Hash} instead.
  */
 public class SHA512HashBuilder extends MessageDigestHashBuilder
 {
    * @param appendSalt
    */
   public SHA512HashBuilder(String value, byte[] salt, int iterations,
-                           boolean appendSalt)
+    boolean appendSalt)
   {
     super(DIGEST, value, salt, iterations, appendSalt, false);
   }
    * @param enableLabel
    */
   public SHA512HashBuilder(String value, byte[] salt, int iterations,
-                           boolean appendSalt, boolean enableLabel)
+    boolean appendSalt, boolean enableLabel)
   {
     super(DIGEST, value, salt, iterations, appendSalt, enableLabel);
   }