{
byte[] passKey = PBEParametersGenerator.PKCS12PasswordToBytes(password);
PBEParametersGenerator pbeGen = new PKCS12ParametersGenerator(new SHA1Digest());
pbeGen.init(passKey, salt, iterationCount);
CipherParameters macParams = pbeGen.generateDerivedMacParameters(hMac.getMacSize());
Arrays.fill(passKey, (byte)0);
hMac.init(macParams);
MacInputStream mIn = new MacInputStream(dIn, hMac);