Files
RAGECOOP-V/Core/Networking/PublicKey.cs

19 lines
444 B
C#
Raw Normal View History

2022-08-18 17:45:08 +08:00
using System;
namespace RageCoop.Core
{
2022-09-08 12:41:56 -07:00
internal class PublicKey
{
2022-10-23 19:02:39 +08:00
public byte[] Exponent;
public byte[] Modulus;
2022-08-18 17:45:08 +08:00
2022-09-08 12:41:56 -07:00
public static PublicKey FromServerInfo(ServerInfo info)
{
return new PublicKey
{
Modulus = Convert.FromBase64String(info.publicKeyModulus),
Exponent = Convert.FromBase64String(info.publicKeyExponent)
2022-08-18 17:45:08 +08:00
};
}
}
2022-10-23 19:02:39 +08:00
}