package kfs.kfsDbi;

import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
 *
 * @author pavedrim
 */
public class kfsPassword extends kfsString {

    public kfsPassword(String name, String label, int pos) {
        super(name, label, 50, pos, defaultCharSet);
    }

    public void encode(String input, kfsRowData rd) {
        setString(encode0(input), rd);
    }

    public boolean equalsPass(String input, kfsRowData rd) {
        return getString(rd).equals(encode0(input));
    }
    private static MessageDigest md = null;

    public static String encode0(String input) {
        if (input == null) {
            return "";
        }
        if (md == null) {
            try {
                md = MessageDigest.getInstance("MD5");
            } catch (NoSuchAlgorithmException ex) {
                Logger.getLogger(kfsPassword.class.getName()).log(Level.SEVERE, "Canot find MD5", ex);
            }
        }
        md.update(input.getBytes());
        byte[] digest = md.digest();
        StringBuilder sb = new StringBuilder();
        for (byte b : digest) {
            sb.append(String.format("%02x", (int) (b & 0xff)));
        }
        return sb.toString();
    }
}

@@ -249,60 +249,295 @@
    p
-ublic kfsPassword(String name, String label, int pos
+rivate final String prefix;%0A%0A    public kfsPassword(String name, int pos) %7B%0A        this(name, pos, %22MD5:%22);%0A    %7D%0A%0A    @Deprecated%0A    public kfsPassword(String name, String label, int pos) %7B%0A        this(name, pos, %22%22);%0A    %7D%0A%0A    public kfsPassword(String name, int pos, String prefix
 ) %7B%0A
@@ -556,21 +556,20 @@
 r(name, 
-label
+name
 , 50, po
@@ -588,16 +588,46 @@
 arSet);%0A
+        this.prefix = prefix;%0A
     %7D%0A%0A 
@@ -697,16 +697,23 @@
 tString(
+prefix+
 encode0(
@@ -829,16 +829,23 @@
 .equals(
+prefix+
 encode0(
@@ -855,24 +855,25 @@
 ut));%0A    %7D%0A
+%0A
     private 

Add prefix to the password