X-Git-Url: http://git.nikiroo.be/?p=nikiroo-utils.git;a=blobdiff_plain;f=src%2Fbe%2Fnikiroo%2Futils%2FCryptUtils.java;h=9ef91015ad14f0ecc5c3d45f3f242628160146cc;hp=72c9c44b449a5e0ef782cb560dfe044c0c6e8840;hb=f8147a0ee57317e96d9ff0bf19573f7168d0354c;hpb=7194ac50b29064a013f177fc9cfc5aaa131a8ec4 diff --git a/src/be/nikiroo/utils/CryptUtils.java b/src/be/nikiroo/utils/CryptUtils.java index 72c9c44..9ef9101 100644 --- a/src/be/nikiroo/utils/CryptUtils.java +++ b/src/be/nikiroo/utils/CryptUtils.java @@ -293,13 +293,7 @@ public class CryptUtils { * it was) */ public byte[] encrypt(String data) throws SSLException { - try { - return encrypt(data.getBytes("UTF8")); - } catch (UnsupportedEncodingException e) { - // UTF-8 is required in all confirm JVMs - e.printStackTrace(); - return null; - } + return encrypt(StringUtils.getBytes(data)); } /** @@ -319,13 +313,7 @@ public class CryptUtils { * it was) */ public String encrypt64(String data) throws SSLException { - try { - return encrypt64(data.getBytes("UTF8")); - } catch (UnsupportedEncodingException e) { - // UTF-8 is required in all confirm JVMs - e.printStackTrace(); - return null; - } + return encrypt64(StringUtils.getBytes(data)); } /**