mirror of
https://github.com/JKorf/CryptoExchange.Net
synced 2025-06-07 16:06:15 +00:00
26 lines
746 B
C#
26 lines
746 B
C#
using CryptoExchange.Net.Interfaces;
|
|
|
|
namespace CryptoExchange.Net.Authentication
|
|
{
|
|
public abstract class AuthenticationProvider
|
|
{
|
|
protected ApiCredentials credentials;
|
|
|
|
protected AuthenticationProvider(ApiCredentials credentials)
|
|
{
|
|
this.credentials = credentials;
|
|
}
|
|
|
|
public abstract string AddAuthenticationToUriString(string uri, bool signed);
|
|
public abstract IRequest AddAuthenticationToRequest(IRequest request, bool signed);
|
|
|
|
protected string ByteToString(byte[] buff)
|
|
{
|
|
var sbinary = "";
|
|
foreach (byte t in buff)
|
|
sbinary += t.ToString("X2"); /* hex format */
|
|
return sbinary;
|
|
}
|
|
}
|
|
}
|