Encrypts/decrypts files based on given key