Class FilePassRecord
This record is part of the file protection. It contains information about the read/write password of the file. All record contents following this record will be encrypted.
Inheritance
Namespace: Syncfusion.XlsIO.Parser.Biff_Records
Assembly: Syncfusion.XlsIO.Base.dll
Syntax
[Biff]
public class FilePassRecord : BiffRecordRaw, ICloneable, IBiffStorage
Constructors
FilePassRecord()
Default constructor
Declaration
public FilePassRecord()
FilePassRecord(Int32)
Reserved for record's internal data array.
Declaration
public FilePassRecord(int iReserve)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | iReserve | Amount of bytes for data array. |
Exceptions
Type | Condition |
---|---|
System.ArgumentOutOfRangeException | If amount of bytes requested is less than zero. |
FilePassRecord(Stream, out Int32)
Read / initialize constructor.
Declaration
public FilePassRecord(Stream stream, out int itemSize)
Parameters
Type | Name | Description |
---|---|---|
System.IO.Stream | stream | Stream from which record data should be read. |
System.Int32 | itemSize | Size of read item. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | If stream is not specified. |
System.ApplicationException | If stream does not support read or seek operations. |
Properties
Hash
Hash value calculated from the read/write password.
Declaration
public ushort Hash { get; set; }
Property Value
Type |
---|
System.UInt16 |
IsWeakEncryption
Indicates whether weak encryption is used.
Declaration
public bool IsWeakEncryption { get; set; }
Property Value
Type |
---|
System.Boolean |
Key
Encryption key calculated from the read/write password.
Declaration
public ushort Key { get; set; }
Property Value
Type |
---|
System.UInt16 |
NeedDecoding
Declaration
public override bool NeedDecoding { get; }
Property Value
Type |
---|
System.Boolean |
Overrides
StandardBlock
Returns content for BIFF8 standard encryption. Read-only.
Declaration
public FilePassStandardBlock StandardBlock { get; }
Property Value
Type |
---|
FilePassStandardBlock |
Methods
CreateStandardBlock()
Creates internal standard encryption block.
Declaration
public void CreateStandardBlock()
GetStoreSize(ExcelVersion)
Size of the required storage space. Read-only.
Declaration
public override int GetStoreSize(ExcelVersion version)
Parameters
Type | Name | Description |
---|---|---|
ExcelVersion | version |
Returns
Type |
---|
System.Int32 |
Overrides
ParseStructure(DataProvider, Int32, Int32, ExcelVersion)
Parse structure of record. Convert Data buffer to special values according to record specification.
Declaration
public override void ParseStructure(DataProvider provider, int iOffset, int iLength, ExcelVersion version)
Parameters
Type | Name | Description |
---|---|---|
DataProvider | provider | Object that provides access to the data. |
System.Int32 | iOffset | Offset to the record's data. |
System.Int32 | iLength | Length of the record's data. |
ExcelVersion | version | Excel version used for infill. |