public FilePassRecord(RecordInputStream in1) { _encryptionType = in1.ReadUShort(); switch (_encryptionType) { case ENCRYPTION_XOR: _keyData = new XorKeyData(); break; case ENCRYPTION_OTHER: _keyData = new Rc4KeyData(); break; default: throw new RecordFormatException("Unknown encryption type " + _encryptionType); } _keyData.Read(in1); }