parent
605463ec24
commit
ae67b12313
28 changed files with 943 additions and 554 deletions
|
@ -2,17 +2,17 @@
|
|||
using System;
|
||||
using Google.Protobuf;
|
||||
|
||||
namespace FrostFS.SDK.ClientV2.Mappers.GRPC;
|
||||
namespace FrostFS.SDK.ClientV2;
|
||||
|
||||
public static class SessionMapper
|
||||
{
|
||||
internal static string SerializeSessionToken(this Session.SessionToken token)
|
||||
internal static byte[] Serialize(this Session.SessionToken token)
|
||||
{
|
||||
byte[] bytes = new byte[token.CalculateSize()];
|
||||
CodedOutputStream stream = new(bytes);
|
||||
token.WriteTo(stream);
|
||||
|
||||
return Convert.ToBase64String(bytes);
|
||||
return bytes;
|
||||
}
|
||||
|
||||
internal static Session.SessionToken DeserializeSessionToken(this byte[] bytes)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue