Struct ObscuredFileReadResult
Contains ObscuredFile read operation results.
public readonly struct ObscuredFileReadResult
Properties
CheatingDetected
Indicates either DataIsNotGenuine or DataFromAnotherDevice is true.
public bool CheatingDetected { get; }
Property Value
- bool
Data
Contains read bytes. Will be null if data was damaged, file does not exists or device lock feature prevented data read.
public byte[] Data { get; }
Property Value
- byte[]
DataFromAnotherDevice
Returns true if device lock feature detected data from another device.
public bool DataFromAnotherDevice { get; }
Property Value
- bool
DataIsNotGenuine
Returns true if saved data has correct header but signature does not matches file contents. Returns false otherwise.
public bool DataIsNotGenuine { get; }
Property Value
- bool
Error
public ObscuredFileError Error { get; }
Property Value
IsValid
Returns true if this struct was filled with actual data, otherwise will stay false.
public bool IsValid { get; }
Property Value
- bool
Success
Returns true in case Data is not null and Error's ErrorCode is ObscuredFileErrorCode.NoError, returns false otherwise.
public bool Success { get; }
Property Value
- bool
Remarks
📝 Note: it will be false if data is not genuine or was loaded from another device even if Data itself was read successfully and not null. Listen to the NotGenuineDataDetected and DataFromAnotherDeviceDetected events (at ObscuredFile or ObscuredFilePrefs) or check CheatingDetected, DataIsNotGenuine and DataFromAnotherDevice properties explicitly to react on the possible cheating.
Methods
ToString()
Returns contents of this operation result.
public override string ToString()
Returns
- string
Human-readable operation result.