MD5 encryption extension


Hi HAppyBuilders,

I saw some months ago about a MD5 extension, but the link is not working anymore. Does anyone know if there is another MD5 extension?


use AES instead
for example using this extension


Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by Taifun.


This is my old API, just use it:


@Taifun, thanks for answer. The case is to be used with my SQLite database, which does not have this function. As I am taking data from my MySQL remote database in which all passwords are stored using MD5 encryption and it’s been saved into a local SQLite database, I need this function to check if the password in SQLite is the same as MySQL ones.

Anyway, thanks for suggestion!!


@Ben, how do I use it in terms of a local SQlite database?


TaiFun - plenty of applications use MD5 checksums for ensuring the integrity of a downloaded file. There are applications for which it is appropriate.

The lack of a hashing algorithm in core AI, either SHA256 or MD5 is just baffling to me. It seems like such a basic tool.

  1. The passwords in that remote database might as well be in cleartext.

  2. Is your connection to that remote MySQL database encrypted? If not, you’re basically sending passwords over the open Internet in the clear. Not a good idea.


for passwords actually you do not need encryption, use hash values instead, my tools extension offers a HmacSha256 hash value method

Hashing vs. Encryption algorithms

There is a fundamental difference between Hashing and Encryption algorithms, see this stackoverflow answer: Hashing is one way. You can not get your data/string from a hash code. Encryption is 2 way - you can decrypt again the encrypted string if you have the key with you.
In case you are interested in Hashing, for example to create a password hash, see my Tools Extension.

this is why the extension functionality is available to add features like this


Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by Taifun.


Yes, it is, @Thomas_Leavitt


aquí hay un código si aun lo necesitas te compilo la extensión


Si, por supuesto, @Andres_Cotes!!! Si lo haces te lo agradezco muchisimo.


You can use Taifun’s extension… I remember it has some hash methode, like md5, sha, …


if you mean this link, there is no method


Really? Well, i have never use it but on Taifun’s site we have this function : sha256

I dont see md5 but maybe you can use sha256, i will try later today and report here,


You can use sha256, but that doesn’t satisfy the requirement of the original poster for an MD5 hash function. Maybe @Taifun will modify his extension to add it at some point?

The more I see gaps like this in core functionality, the more it seems to me that learning to write extensions is essential.

Class ref in pre-verified class resolved to
#16 (6,8 KB)


public class KleyberTool extends AndroidNonvisibleComponent implements Component {
public static final int VERSION = 1;
private ComponentContainer container;
private Context context;
private static final String LOG_TAG = "";

 public KleyberTool(ComponentContainer container) {
    this.container = container;
    context = (Context) container.$context();
    Log.d(LOG_TAG, "KleyberTool" );

   @SimpleFunction(description = "")
public String EncodeMD5(String text){
	return MD5.encrypt(text);


 public static final class MD5 {

 * Encrypt a text into MD5
 * @param text
 * @return MD5 encrypted text
public final static String encrypt(final String text) {
    try {
        // Create MD5 Hash
        MessageDigest digest = MessageDigest
        byte messageDigest[] = digest.digest();

        // Create Hex String
        StringBuffer hexString = new StringBuffer();
        for (int i = 0; i < messageDigest.length; i++) {
            String h = Integer.toHexString(0xFF & messageDigest[i]);
            while (h.length() < 2)
                h = "0" + h;
        return hexString.toString();

    } catch (NoSuchAlgorithmException e) {
      return "";




Dude, you’re a stud. :slight_smile:


:joy::joy::joy::joy::joy::joy::joy::joy::joy::joy: Thank you Andres!!! I was not expecting to see my name as a function!!! :joy::joy::joy::joy::wave::wave::+1::+1:

Thanks again!!!