1
0
mirror of https://github.com/JKorf/CryptoExchange.Net synced 2025-06-07 16:06:15 +00:00
CryptoExchange.Net/Authentication/AuthenticationProvider.cs
2018-03-05 09:38:24 +01:00

27 lines
789 B
C#

using CryptoExchange.Net.Interfaces;
namespace CryptoExchange.Net.Authentication
{
public abstract class AuthenticationProvider
{
public ApiCredentials Credentials { get; }
protected AuthenticationProvider(ApiCredentials credentials)
{
Credentials = credentials;
}
public abstract string AddAuthenticationToUriString(string uri, bool signed);
public abstract IRequest AddAuthenticationToRequest(IRequest request, bool signed);
public abstract string Sign(string toSign);
protected string ByteToString(byte[] buff)
{
var sbinary = "";
foreach (var t in buff)
sbinary += t.ToString("X2"); /* hex format */
return sbinary;
}
}
}