I probably wll look silly if someone has allready done this, but I thought I would post my code to convert a key file (that .der) into java byte array representation, as regardless of what instructions said, i could find no trace of such on the dev site.
StringBuilder build=new StringBuilder();
File file=new File(args[0]);
byte[] bytes=Files.toByteArray(file);
build.append("private static final byte[] APPLICATION_KEY = {");
for(byte b:bytes)
{
build.append(String.format("(byte)0x%02X, ", b));
}
build.append("};");
System.out.println(build.toString());
This Project was called VinzClortho for obvious reasons.
Comments