public static byte [ ] decryptInitPacket ( byte [ ] encryptedDataParam , String passwordParam , String saltParam , byte [ ] ivParam , byte [ ] seedParam ) { //Stored like this in the database, so we have to get the password as stored in the database so that the // SHa256 and SALT combination will be valid... byte [ ] passwordSha256 = sha256 ( passwordParam . concat ( saltParam ) . getBytes ( ) ) ; //Add the seed to the password and SHA-256... byte [ ] derivedKey = sha256 ( UtilGlobal . addAll ( passwordSha256 , seedParam ) ) ; //Decrypt with the derived key. return decrypt ( derivedKey , encryptedDataParam , ivParam ) ; }
Decrypts the encrypted data .