@@ -0,0 +1,1404 @@
+package se.soy.securerstring;%0Aimport java.lang.reflect.*;%0Aimport java.security.SecureRandom;%0A%0Apublic class SecurerString implements AutoCloseable %7B%0A%0A  public char%5B%5D chars;%0A%0A  @Override%0A  public void close() %7B%0A    secureErase(this.chars);%0A  %7D%0A%0A  public void secureErase(char extinct%5B%5D) %7B%0A    byte bytes%5B%5D = new byte%5Bextinct.length%5D;%0A    SecureRandom random = new SecureRandom();%0A    random.nextBytes(bytes);%0A    for (int i = 0; i %3C extinct.length; i = i + 1) %7B%0A      extinct%5Bi%5D = (char)(bytes%5Bi%5D);%0A    %7D%0A  %7D%0A%0A  public int nearestInt(int minLength) %7B%0A    int length = 0;%0A    while (length %3C minLength) %7B%0A      length += 1024;%0A    %7D%0A    return length;%0A  %7D%0A%0A  public SecurerString(String str) %7B%0A    Field valueField = null;%0A    try %7B%0A      valueField = String.class.getDeclaredField(%22value%22);%0A    %7D%0A    catch (NoSuchFieldException e) %7B%0A      e.printStackTrace();%0A    %7D%0A    valueField.setAccessible(true);%0A%0A    try %7B%0A      this.chars = new char%5BnearestInt(((char%5B%5D)valueField.get(str)).length)%5D;%0A      System.arraycopy((char%5B%5D)valueField.get(str), 0, this.chars, 0, ((char%5B%5D)valueField.get(str)).length);%0A      secureErase((char%5B%5D)valueField.get(str));%0A    %7D%0A    catch (IllegalAccessException e) %7B%0A      e.printStackTrace();%0A    %7D%0A  %7D%0A%0A  public SecurerString(char%5B%5D chr) %7B%0A    this.chars = new char%5BnearestInt(chr.length)%5D;%0A    System.arraycopy(chr, 0, this.chars, 0, chr.length);%0A    secureErase(chr);%0A  %7D%0A%7D%0A

Add SecurerString implementation