Skip to content

Commit fe2c56e

Browse files
feat: introduce EplSecret to clarify the logic
1 parent 4f81784 commit fe2c56e

5 files changed

Lines changed: 219 additions & 95 deletions

File tree

Lines changed: 161 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,161 @@
1+
using QIQI.EProjectFile.Internal;
2+
using System;
3+
using System.Collections.Generic;
4+
using System.Collections.Immutable;
5+
using System.Runtime.CompilerServices;
6+
using System.Security.Cryptography;
7+
using System.Text;
8+
9+
namespace QIQI.EProjectFile.Encryption
10+
{
11+
public abstract class EplSecret
12+
{
13+
public abstract ImmutableArray<byte> SecretId { get; }
14+
public abstract ImmutableArray<byte> IV { get; }
15+
16+
public sealed class EStd: EplSecret, IEquatable<EStd>
17+
{
18+
public override ImmutableArray<byte> SecretId { get; }
19+
public override ImmutableArray<byte> IV { get; }
20+
21+
public EStd(byte[] key)
22+
{
23+
var status = new RC4Crypto(key, 256).UnsafeGetStatus();
24+
SecretId = CalculateSecretID(key);
25+
IV = Unsafe.As<byte[], ImmutableArray<byte>>(ref status);
26+
}
27+
28+
private static ImmutableArray<byte> CalculateSecretID(byte[] key)
29+
{
30+
byte[] hash = MD5.Create().ComputeHash(key);
31+
StringBuilder stringBuilder = new StringBuilder();
32+
for (int i = hash.Length - 1; i >= 0; i--)
33+
{
34+
stringBuilder.Append(hash[i].ToString("x2"));
35+
}
36+
37+
var bytes = Encoding.ASCII.GetBytes(stringBuilder.ToString());
38+
return Unsafe.As<byte[], ImmutableArray<byte>>(ref bytes);
39+
}
40+
41+
public override bool Equals(object obj)
42+
{
43+
return Equals(obj as EStd);
44+
}
45+
46+
public bool Equals(EStd other)
47+
{
48+
return !(other is null) &&
49+
SecretId.Equals(other.SecretId) &&
50+
IV.Equals(other.IV);
51+
}
52+
53+
public override int GetHashCode()
54+
{
55+
int hashCode = -1032396774;
56+
hashCode = hashCode * -1521134295 + SecretId.GetHashCode();
57+
hashCode = hashCode * -1521134295 + IV.GetHashCode();
58+
return hashCode;
59+
}
60+
61+
public static bool operator ==(EStd left, EStd right)
62+
{
63+
return EqualityComparer<EStd>.Default.Equals(left, right);
64+
}
65+
66+
public static bool operator !=(EStd left, EStd right)
67+
{
68+
return !(left == right);
69+
}
70+
}
71+
72+
public sealed class EC: EplSecret, IEquatable<EC>
73+
{
74+
public override ImmutableArray<byte> SecretId { get; }
75+
public override ImmutableArray<byte> IV { get; }
76+
77+
public EC(byte[] key)
78+
{
79+
var status = new RC4Crypto(key, DefaultInitialStatus).UnsafeGetStatus();
80+
SecretId = CalculateSecretID(key);
81+
IV = Unsafe.As<byte[], ImmutableArray<byte>>(ref status);
82+
}
83+
84+
internal static readonly byte[] DefaultInitialStatus = new byte[] {
85+
0xF0, 0x5E, 0x99, 0xA1, 0x88, 0xE3, 0x1E, 0xEE, 0x11, 0x9E, 0xC9, 0x97, 0x1B, 0x90, 0x4F, 0x7C,
86+
0x52, 0xCB, 0x82, 0xFA, 0x27, 0xDE, 0xF6, 0xA8, 0xDA, 0xD3, 0xB0, 0xCF, 0x56, 0xD6, 0x85, 0x42,
87+
0x1A, 0x9C, 0xB5, 0x0E, 0xB8, 0xED, 0x10, 0x1C, 0x24, 0x6A, 0x69, 0xCE, 0x87, 0x55, 0x1F, 0x96,
88+
0x6C, 0x7B, 0xBA, 0x65, 0x14, 0xAA, 0x2C, 0xDD, 0xA3, 0xB6, 0x7D, 0x63, 0xF5, 0xE9, 0x8E, 0x20,
89+
0x41, 0x23, 0x78, 0x8C, 0xFC, 0x22, 0x9F, 0xA6, 0xB4, 0x6F, 0xA7, 0x77, 0x59, 0xC0, 0xBF, 0x3A,
90+
0x30, 0xA2, 0x15, 0x2A, 0x53, 0x5D, 0x74, 0x4D, 0x93, 0xFB, 0xF7, 0x40, 0x73, 0x28, 0x6E, 0x76,
91+
0xD5, 0xB1, 0x2D, 0x95, 0x70, 0xF4, 0x3C, 0x34, 0xE5, 0x4C, 0x5B, 0xBB, 0x5F, 0x50, 0x58, 0x8D,
92+
0x6B, 0xB7, 0x61, 0x09, 0xF2, 0x48, 0xCA, 0x81, 0x37, 0x45, 0xEF, 0xD0, 0xBE, 0xD9, 0xD4, 0xE7,
93+
0x9D, 0x33, 0x91, 0x71, 0x2F, 0x3B, 0xE6, 0x0D, 0xFE, 0x79, 0x49, 0x67, 0x19, 0xA5, 0x08, 0xAF,
94+
0x80, 0xB2, 0xEB, 0x3E, 0xD2, 0xB9, 0xD1, 0x44, 0x57, 0x8F, 0x8A, 0x4B, 0x39, 0xF1, 0x66, 0xEA,
95+
0xE2, 0xDF, 0xF3, 0x7A, 0x98, 0xCD, 0xAB, 0x8B, 0x04, 0x62, 0x54, 0x16, 0x12, 0x43, 0x02, 0xD8,
96+
0x36, 0x72, 0x06, 0x7F, 0x25, 0xE0, 0x2E, 0x05, 0x0F, 0xFF, 0xAD, 0x03, 0x07, 0xE1, 0x94, 0x17,
97+
0xC1, 0x32, 0xC3, 0x51, 0xD7, 0xDB, 0xE8, 0xE4, 0x75, 0x3F, 0x01, 0x26, 0x4A, 0x29, 0x64, 0x47,
98+
0x86, 0x3D, 0xBD, 0xDC, 0x83, 0x2B, 0x68, 0x1D, 0x46, 0xEC, 0xC4, 0x9A, 0xC8, 0x31, 0x4E, 0xA9,
99+
0xA4, 0x35, 0x9B, 0xAC, 0x5C, 0x0B, 0x92, 0xCC, 0x0A, 0x84, 0x13, 0x0C, 0x00, 0xA0, 0xB3, 0x60,
100+
0x18, 0x5A, 0xC5, 0xC6, 0x89, 0x7E, 0x21, 0xF9, 0xC2, 0x6D, 0xBC, 0xC7, 0xAE, 0x38, 0xFD, 0xF8
101+
};
102+
103+
104+
private static ImmutableArray<byte> CalculateSecretID(byte[] key)
105+
{
106+
byte[] hash = MD5.Create().ComputeHash(key);
107+
108+
// 是的!该非标准MD5不是单纯的把标准MD5两两颠倒过来就好!
109+
// 以123为例
110+
// 标准MD5:202cb962ac59075b964b07152d234b70
111+
// 颠倒MD5:704b232d15074b965b0759ac62b92c20
112+
// 易式MD5:704b232d15074bb6590759ac62b92c20
113+
byte low4bit_7 = (byte)(hash[7] & 0x0F);
114+
byte high4bit_7 = (byte)(hash[7] & 0xF0);
115+
byte low4bit_8 = (byte)(hash[8] & 0x0F);
116+
byte high4bit_8 = (byte)(hash[8] & 0xF0);
117+
hash[7] = (byte)(high4bit_7 | high4bit_8 >> 4);
118+
hash[8] = (byte)(low4bit_7 << 4 | low4bit_8);
119+
120+
StringBuilder stringBuilder = new StringBuilder();
121+
for (int i = hash.Length - 1; i >= 0; i--)
122+
{
123+
stringBuilder.Append(hash[i].ToString("x2"));
124+
}
125+
126+
var bytes = Encoding.ASCII.GetBytes(stringBuilder.ToString());
127+
return Unsafe.As<byte[], ImmutableArray<byte>>(ref bytes);
128+
}
129+
130+
public override bool Equals(object obj)
131+
{
132+
return Equals(obj as EC);
133+
}
134+
135+
public bool Equals(EC other)
136+
{
137+
return !(other is null) &&
138+
SecretId.Equals(other.SecretId) &&
139+
IV.Equals(other.IV);
140+
}
141+
142+
public override int GetHashCode()
143+
{
144+
int hashCode = -1032396774;
145+
hashCode = hashCode * -1521134295 + SecretId.GetHashCode();
146+
hashCode = hashCode * -1521134295 + IV.GetHashCode();
147+
return hashCode;
148+
}
149+
150+
public static bool operator ==(EC left, EC right)
151+
{
152+
return EqualityComparer<EC>.Default.Equals(left, right);
153+
}
154+
155+
public static bool operator !=(EC left, EC right)
156+
{
157+
return !(left == right);
158+
}
159+
}
160+
}
161+
}
Lines changed: 5 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
using System;
1+
using QIQI.EProjectFile.Encryption;
2+
using System;
23
using System.Collections.Generic;
34
using System.Security.Cryptography;
45
using System.Text;
@@ -7,62 +8,16 @@ namespace QIQI.EProjectFile.Internal
78
{
89
sealed class CryptoECTransform : EStdCryptoTransform
910
{
10-
private static readonly byte[] DefaultInitialStatus = new byte[] {
11-
0xF0, 0x5E, 0x99, 0xA1, 0x88, 0xE3, 0x1E, 0xEE, 0x11, 0x9E, 0xC9, 0x97, 0x1B, 0x90, 0x4F, 0x7C,
12-
0x52, 0xCB, 0x82, 0xFA, 0x27, 0xDE, 0xF6, 0xA8, 0xDA, 0xD3, 0xB0, 0xCF, 0x56, 0xD6, 0x85, 0x42,
13-
0x1A, 0x9C, 0xB5, 0x0E, 0xB8, 0xED, 0x10, 0x1C, 0x24, 0x6A, 0x69, 0xCE, 0x87, 0x55, 0x1F, 0x96,
14-
0x6C, 0x7B, 0xBA, 0x65, 0x14, 0xAA, 0x2C, 0xDD, 0xA3, 0xB6, 0x7D, 0x63, 0xF5, 0xE9, 0x8E, 0x20,
15-
0x41, 0x23, 0x78, 0x8C, 0xFC, 0x22, 0x9F, 0xA6, 0xB4, 0x6F, 0xA7, 0x77, 0x59, 0xC0, 0xBF, 0x3A,
16-
0x30, 0xA2, 0x15, 0x2A, 0x53, 0x5D, 0x74, 0x4D, 0x93, 0xFB, 0xF7, 0x40, 0x73, 0x28, 0x6E, 0x76,
17-
0xD5, 0xB1, 0x2D, 0x95, 0x70, 0xF4, 0x3C, 0x34, 0xE5, 0x4C, 0x5B, 0xBB, 0x5F, 0x50, 0x58, 0x8D,
18-
0x6B, 0xB7, 0x61, 0x09, 0xF2, 0x48, 0xCA, 0x81, 0x37, 0x45, 0xEF, 0xD0, 0xBE, 0xD9, 0xD4, 0xE7,
19-
0x9D, 0x33, 0x91, 0x71, 0x2F, 0x3B, 0xE6, 0x0D, 0xFE, 0x79, 0x49, 0x67, 0x19, 0xA5, 0x08, 0xAF,
20-
0x80, 0xB2, 0xEB, 0x3E, 0xD2, 0xB9, 0xD1, 0x44, 0x57, 0x8F, 0x8A, 0x4B, 0x39, 0xF1, 0x66, 0xEA,
21-
0xE2, 0xDF, 0xF3, 0x7A, 0x98, 0xCD, 0xAB, 0x8B, 0x04, 0x62, 0x54, 0x16, 0x12, 0x43, 0x02, 0xD8,
22-
0x36, 0x72, 0x06, 0x7F, 0x25, 0xE0, 0x2E, 0x05, 0x0F, 0xFF, 0xAD, 0x03, 0x07, 0xE1, 0x94, 0x17,
23-
0xC1, 0x32, 0xC3, 0x51, 0xD7, 0xDB, 0xE8, 0xE4, 0x75, 0x3F, 0x01, 0x26, 0x4A, 0x29, 0x64, 0x47,
24-
0x86, 0x3D, 0xBD, 0xDC, 0x83, 0x2B, 0x68, 0x1D, 0x46, 0xEC, 0xC4, 0x9A, 0xC8, 0x31, 0x4E, 0xA9,
25-
0xA4, 0x35, 0x9B, 0xAC, 0x5C, 0x0B, 0x92, 0xCC, 0x0A, 0x84, 0x13, 0x0C, 0x00, 0xA0, 0xB3, 0x60,
26-
0x18, 0x5A, 0xC5, 0xC6, 0x89, 0x7E, 0x21, 0xF9, 0xC2, 0x6D, 0xBC, 0xC7, 0xAE, 0x38, 0xFD, 0xF8
27-
};
28-
29-
public CryptoECTransform(byte[] key): base(key)
11+
public CryptoECTransform(EplSecret.EC secret, int lengthOfOvert = 0): base(secret, lengthOfOvert)
3012
{
3113
}
3214

33-
protected override byte[] InitialStatus => DefaultInitialStatus;
34-
3515
protected override RC4Crypto NextBlockCrypto()
3616
{
3717
byte[] blockKey = new byte[40];
3818
keyTable.Decode(blockKey, 0, 8);
39-
Array.Copy(SecretId, 0, blockKey, 8, 32);
40-
return new RC4Crypto(blockKey, InitialStatus);
41-
}
42-
43-
protected override byte[] CalculateSecretID(byte[] key)
44-
{
45-
byte[] hash = MD5.Create().ComputeHash(key);
46-
47-
// 是的!该非标准MD5不是单纯的把标准MD5两两颠倒过来就好!
48-
// 以123为例
49-
// 标准MD5:202cb962ac59075b964b07152d234b70
50-
// 颠倒MD5:704b232d15074b965b0759ac62b92c20
51-
// 易式MD5:704b232d15074bb6590759ac62b92c20
52-
byte low4bit_7 = (byte)(hash[7] & 0x0F);
53-
byte high4bit_7 = (byte)(hash[7] & 0xF0);
54-
byte low4bit_8 = (byte)(hash[8] & 0x0F);
55-
byte high4bit_8 = (byte)(hash[8] & 0xF0);
56-
hash[7] = (byte)(high4bit_7 | high4bit_8 >> 4);
57-
hash[8] = (byte)(low4bit_7 << 4 | low4bit_8);
58-
59-
StringBuilder stringBuilder = new StringBuilder();
60-
for (int i = hash.Length - 1; i >= 0; i--)
61-
{
62-
stringBuilder.Append(hash[i].ToString("x2"));
63-
}
64-
65-
return Encoding.ASCII.GetBytes(stringBuilder.ToString());
19+
SecretId.CopyTo(0, blockKey, 8, 32);
20+
return new RC4Crypto(blockKey, EplSecret.EC.DefaultInitialStatus);
6621
}
6722
}
6823
}
Lines changed: 17 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,36 @@
1-
using System;
1+
using QIQI.EProjectFile.Encryption;
2+
using System;
23
using System.Collections.Generic;
4+
using System.Collections.Immutable;
35
using System.Security.Cryptography;
46
using System.Text;
57

68
namespace QIQI.EProjectFile.Internal
79
{
810
internal class EStdCryptoTransform : ICryptoTransform
911
{
10-
private static readonly byte[] DefaultInitialStatus = new byte[] {
11-
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F,
12-
0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F,
13-
0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2A, 0x2B, 0x2C, 0x2D, 0x2E, 0x2F,
14-
0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3A, 0x3B, 0x3C, 0x3D, 0x3E, 0x3F,
15-
0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, 0x4F,
16-
0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5A, 0x5B, 0x5C, 0x5D, 0x5E, 0x5F,
17-
0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x6F,
18-
0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7A, 0x7B, 0x7C, 0x7D, 0x7E, 0x7F,
19-
0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8A, 0x8B, 0x8C, 0x8D, 0x8E, 0x8F,
20-
0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, 0x9A, 0x9B, 0x9C, 0x9D, 0x9E, 0x9F,
21-
0xA0, 0xA1, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6, 0xA7, 0xA8, 0xA9, 0xAA, 0xAB, 0xAC, 0xAD, 0xAE, 0xAF,
22-
0xB0, 0xB1, 0xB2, 0xB3, 0xB4, 0xB5, 0xB6, 0xB7, 0xB8, 0xB9, 0xBA, 0xBB, 0xBC, 0xBD, 0xBE, 0xBF,
23-
0xC0, 0xC1, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, 0xC8, 0xC9, 0xCA, 0xCB, 0xCC, 0xCD, 0xCE, 0xCF,
24-
0xD0, 0xD1, 0xD2, 0xD3, 0xD4, 0xD5, 0xD6, 0xD7, 0xD8, 0xD9, 0xDA, 0xDB, 0xDC, 0xDD, 0xDE, 0xDF,
25-
0xE0, 0xE1, 0xE2, 0xE3, 0xE4, 0xE5, 0xE6, 0xE7, 0xE8, 0xE9, 0xEA, 0xEB, 0xEC, 0xED, 0xEE, 0xEF,
26-
0xF0, 0xF1, 0xF2, 0xF3, 0xF4, 0xF5, 0xF6, 0xF7, 0xF8, 0xF9, 0xFA, 0xFB, 0xFC, 0xFD, 0xFE, 0xFF,
27-
};
28-
29-
protected virtual byte[] InitialStatus => DefaultInitialStatus;
30-
3112
private const int BlockLength = 4096;
3213
protected readonly RC4Crypto keyTable;
3314

34-
public byte[] SecretId { get; }
15+
public ImmutableArray<byte> SecretId { get; }
3516
private int lengthOfRemainedOvert = 0;
3617

37-
public EStdCryptoTransform(byte[] key, int lengthOfOvert = 0)
18+
public EStdCryptoTransform(EplSecret.EStd secret, int lengthOfOvert = 0): this((EplSecret)secret, lengthOfOvert)
19+
{
20+
}
21+
22+
protected EStdCryptoTransform(EplSecret secret, int lengthOfOvert = 0)
3823
{
24+
if (secret is null)
25+
{
26+
throw new ArgumentNullException(nameof(secret));
27+
}
3928
if (lengthOfOvert < 0)
4029
{
4130
throw new ArgumentException(nameof(lengthOfOvert));
4231
}
43-
keyTable = new RC4Crypto(key, InitialStatus);
44-
SecretId = CalculateSecretID(key);
32+
keyTable = new RC4Crypto(default, secret.IV);
33+
SecretId = secret.SecretId;
4534
lengthOfRemainedOvert = lengthOfOvert;
4635
}
4736

@@ -82,12 +71,12 @@ protected virtual RC4Crypto NextBlockCrypto()
8271
var nPrefix = blockKey[0] + (blockKey[1] << 8) + (blockKey[2] << 16) + (blockKey[3] << 24);
8372
var nSuffix = blockIndex ^ nPrefix;
8473
blockIndex++;
85-
Array.Copy(SecretId, 0, blockKey, 4, 32);
74+
SecretId.CopyTo(0, blockKey, 4, 32);
8675
blockKey[36] = unchecked((byte)(nSuffix & 0xFF));
8776
blockKey[37] = unchecked((byte)((nSuffix >> 8) & 0xFF));
8877
blockKey[38] = unchecked((byte)((nSuffix >> 16) & 0xFF));
8978
blockKey[39] = unchecked((byte)((nSuffix >> 24) & 0xFF));
90-
var crypto = new RC4Crypto(blockKey, InitialStatus);
79+
var crypto = new RC4Crypto(blockKey, 256);
9180
crypto.Skip(36); // Magic
9281
return crypto;
9382
}
@@ -98,16 +87,5 @@ public byte[] TransformFinalBlock(byte[] inputBuffer, int inputOffset, int input
9887
TransformBlock(inputBuffer, inputOffset, inputCount, buf, 0);
9988
return buf;
10089
}
101-
102-
protected virtual byte[] CalculateSecretID(byte[] key)
103-
{
104-
byte[] hash = MD5.Create().ComputeHash(key);
105-
StringBuilder stringBuilder = new StringBuilder();
106-
for (int i = hash.Length - 1; i >= 0; i--)
107-
{
108-
stringBuilder.Append(hash[i].ToString("x2"));
109-
}
110-
return Encoding.ASCII.GetBytes(stringBuilder.ToString());
111-
}
11290
}
11391
}

EProjectFile/Internal/RC4Crypto.cs

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
using System;
22
using System.Collections.Generic;
3+
using System.Collections.Immutable;
34
using System.Linq;
5+
using System.Runtime.CompilerServices;
46
using System.Text;
57

68
namespace QIQI.EProjectFile.Internal
@@ -18,6 +20,18 @@ public RC4Crypto(byte[] key, byte[] initialStatus)
1820
status = (byte[])initialStatus?.Clone() ?? throw new ArgumentNullException(nameof(initialStatus));
1921
EmitKey(key);
2022
}
23+
/// <param name="key">It can be null</param>
24+
/// <param name="initialStatus">It cannot be null</param>
25+
/// <exception cref="ArgumentNullException"></exception>
26+
public RC4Crypto(ImmutableArray<byte> key, ImmutableArray<byte> initialStatus)
27+
{
28+
if (initialStatus.IsDefault)
29+
{
30+
throw new ArgumentException(nameof(initialStatus));
31+
}
32+
status = initialStatus.ToArray();
33+
EmitKey(key);
34+
}
2135
public RC4Crypto(byte[] key, int statusLength)
2236
{
2337
status = new byte[statusLength];
@@ -27,9 +41,19 @@ public RC4Crypto(byte[] key, int statusLength)
2741
}
2842
EmitKey(key);
2943
}
30-
private void EmitKey(byte[] key)
44+
public RC4Crypto(ImmutableArray<byte> key, int statusLength)
45+
{
46+
status = new byte[statusLength];
47+
for (i = 0; i < statusLength; i++)
48+
{
49+
status[i] = unchecked((byte)i);
50+
}
51+
EmitKey(key);
52+
}
53+
private void EmitKey(byte[] key) => EmitKey(Unsafe.As<byte[], ImmutableArray<byte>>(ref key));
54+
private void EmitKey(ImmutableArray<byte> key)
3155
{
32-
if (key is null)
56+
if (key.IsDefaultOrEmpty)
3357
{
3458
return;
3559
}
@@ -54,6 +78,11 @@ public void Decode(byte[] data, long start, long length)
5478
}
5579
}
5680
}
81+
/// <remarks>do not modify the return value</remarks>
82+
internal byte[] UnsafeGetStatus()
83+
{
84+
return status;
85+
}
5786
public void Encode(byte[] data, long start, long length) => Decode(data, start, length);
5887
public void Decode(byte[] data) => Decode(data, 0, data.Length);
5988
public void Encode(byte[] data) => Encode(data, 0, data.Length);

0 commit comments

Comments
 (0)