X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fbe%2Fnikiroo%2Futils%2FCryptUtils.java;fp=src%2Fbe%2Fnikiroo%2Futils%2FCryptUtils.java;h=681692a00e6323531b1dae680bf5d0b774c8190a;hb=272f5c86957c3caf4b3ed7d59448573914b7b33f;hp=fdf05565b508c48f2c8d0722d2ce1b6a5a6cf38e;hpb=7b42695f536a88cfc5fed57e98687394e3c42fe9;p=fanfix.git diff --git a/src/be/nikiroo/utils/CryptUtils.java b/src/be/nikiroo/utils/CryptUtils.java index fdf0556..681692a 100644 --- a/src/be/nikiroo/utils/CryptUtils.java +++ b/src/be/nikiroo/utils/CryptUtils.java @@ -42,7 +42,11 @@ public class CryptUtils { */ public CryptUtils(String key) { try { - init(key2key(key)); + byte[] bytes32 = key2key(key); + init(bytes32); + for (int i = 0 ; i < bytes32.length ; i++) { + bytes32[i] = 0; + } } catch (InvalidKeyException e) { // We made sure that the key is correct, so nothing here e.printStackTrace(); @@ -62,6 +66,9 @@ public class CryptUtils { */ public CryptUtils(byte[] bytes32) throws InvalidKeyException { init(bytes32); + for (int i = 0 ; i < bytes32.length ; i++) { + bytes32[i] = 0; + } } /**