question: private byte [ ] convertPasswordToKey ( byte [ ] password ) { try { MessageDigest md = MessageDigest . getInstance ( "SHA" ) ; byte [ ] seed = md . digest ( password ) ; SecureRandom random = SecureRandom . getInstance ( "SHA1PRNG" ) ; random . setSeed ( seed ) ; byte [ ] rawkey = new byte [ keyLength ] ; random . nextBytes ( rawkey ) ; return rawkey ; } catch ( Exception e ) { throw new RuntimeException ( e ) ; } }
target:  This method converts the specified password into a key in a deterministic manner. The key is then usable for creating ciphers and MACs.