added PIN salting and according AES key generation, fixed tests