submodule对gitea不管用,所以直接拉了一份拉格兰
This commit is contained in:
24
Lagrange.Core/Lagrange.Core.Test/Protobuf.cs
Normal file
24
Lagrange.Core/Lagrange.Core.Test/Protobuf.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
using Lagrange.Core.Internal.Packets.Login.Ecdh;
|
||||
using Lagrange.Core.Utility.Extension;
|
||||
using ProtoBuf;
|
||||
|
||||
namespace Lagrange.Core.Test;
|
||||
|
||||
public class Protobuf
|
||||
{
|
||||
public void Test()
|
||||
{
|
||||
|
||||
var test = new SsoKeyExchange()
|
||||
{
|
||||
PubKey = new byte[] { 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11 },
|
||||
GcmCalc2 = new byte[] { 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11 },
|
||||
GcmCalc1 = new byte[] { 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11 },
|
||||
Timestamp = 23456789,
|
||||
Type = 1
|
||||
};
|
||||
using var stream = new MemoryStream();
|
||||
Serializer.Serialize(stream, test);
|
||||
Console.WriteLine(stream.ToArray().Hex(false, true));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user