17 lines
699 B
C#
17 lines
699 B
C#
namespace EnvelopeGenerator.Application.Services
|
|
{
|
|
public static class EnvelopeGeneratorExtensions
|
|
{
|
|
public static (string EnvelopeUuid, string ReceiverSignature) DecodeEnvelopeReceiverId(this string envelopeReceiverId)
|
|
{
|
|
byte[] bytes = Convert.FromBase64String(envelopeReceiverId);
|
|
string decodedString = System.Text.Encoding.UTF8.GetString(bytes);
|
|
string[] parts = decodedString.Split(new string[] { "::" }, StringSplitOptions.None);
|
|
|
|
if (parts.Length > 1)
|
|
return (EnvelopeUuid: parts[0], ReceiverSignature: parts[1]);
|
|
else
|
|
return (string.Empty, string.Empty);
|
|
}
|
|
}
|
|
} |