I think the order it wrote with a randomAccessFile doesn't match with the order it read. How do I correct this? Is it something to do with Big/Little Endian?
RandomAccessFile accessor = new RandomAccessFile (new File("passwd_file"), "rws");
accessor.write(macbytes);
//System.out.println(macbytes);
byte[] test=new byte[(int) accessor.length()];
accessor.seek(0);
accessor.read(test);
//System.out.println(test);
if (test.equals(macbytes))System.out.println("true");
else System.out.println("false");