Java error: void cannot be converted to String

Your function has no return value void and you try to assign it to a string variable, that is what the error message means. So change: public static void encrypt(String original) throws Exception { to public static String encrypt(String original) throws Exception { and So the class looks like: class MD5Digest { public static String … Read more