Well, the trick is that using a KeyStore ensures that the key doesn't leak into the application (but is only used for cryptographic operations in a trusted environment).
However, you would need the plain key to authenticate against the database so using this wouldn't work.
However, you would need the plain key to authenticate against the database so using this wouldn't work.