Password.cs 846 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Text;
  4. using System.Runtime.InteropServices;
  5. using Biff8Excel.Interfaces;
  6. namespace Biff8Excel.Records
  7. {
  8. [StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Auto, Pack = 1)]
  9. struct RecordPasswod
  10. {
  11. public ushort opcode;
  12. public ushort length;
  13. public ushort password;
  14. }
  15. internal class Password : IRecords
  16. {
  17. RecordPasswod password;
  18. public Password()
  19. {
  20. password.opcode = 0x13;
  21. password.length = 0x2;
  22. }
  23. public ushort PasswordHash
  24. {
  25. set { password.password = value; }
  26. }
  27. #region IRecords ³ÉÔ±
  28. public byte[] GetByte()
  29. {
  30. return Globals.GetStructToBytes(password);
  31. }
  32. #endregion
  33. }
  34. }