Bug #3173: libsqlfs: change password API
Expose password changing API in Java
Changing the VFS password should be possible as it is an important real world requirement.
expose new raw key API in Java, to work better with CacheWord
CacheWord generates the raw key based on a dynamic number of iterations of the
KDF, so that it doesn't take ridiculously long on old devices, but on new
devices has a reasonable number of KDF iterations. The exposes that API into
IOCipher's Java interface for easy integration with CacheWord.
Also, using byte for storing passwords means that Java code can zero out the
memory after the password/key is no longer in use. Strings are immutable in
Java, so the memory cannot be zeroed out. byte are very mutable, so they can
easily be zeroed out after use. Therefore only accept the database key as a
byte to encourage people to wipe the key from memory when they are done with