[성현모] NetStandard Dll 추가
This commit is contained in:
105
Projects/NetStandard/KmsProxy/KmsProxy.cs
Normal file
105
Projects/NetStandard/KmsProxy/KmsProxy.cs
Normal file
@ -0,0 +1,105 @@
|
||||
using KmsProxy.Models;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace KmsProxy
|
||||
{
|
||||
public class KmsProxy
|
||||
{
|
||||
public static int Port { get; set; } = 9200;
|
||||
|
||||
//1. EcuID
|
||||
public static async Task<EcuID.Response_SupplierEcuID> EcuID_SupplierEcuID(string host, EcuID.Request_SupplierEcuID request)
|
||||
{
|
||||
string url = $"https://{host}:{Port}/kms/ecuid/supplierEcuID";
|
||||
|
||||
var res = await RestAPI.PostAsync<EcuID.Request_SupplierEcuID, EcuID.Response_SupplierEcuID>(url, request);
|
||||
return res;
|
||||
}
|
||||
|
||||
//2. MasterECUKEy
|
||||
public static async Task<MasterEcuKey.Response_SupplierKeyProvisioning> MasterEcuKey_SupplierKeyProvisioning(string host, MasterEcuKey.Request_SupplierKeyProvisioning request)
|
||||
{
|
||||
string url = $"https://{host}:{Port}/kms/MasterEcuKey/SupplierKeyProvisioning";
|
||||
|
||||
var res = await RestAPI.PostAsync<MasterEcuKey.Request_SupplierKeyProvisioning, MasterEcuKey.Response_SupplierKeyProvisioning>(url, request);
|
||||
return res;
|
||||
}
|
||||
|
||||
public static async Task<MasterEcuKey.Response_SupplierKeyProvisioning_Result> MasterEcuKey_SupplierKeyProvisioningResult(string host, MasterEcuKey.Request_SupplierKeyProvisioning_Result request)
|
||||
{
|
||||
string url = $"https://{host}:{Port}/kms/MasterEcuKey/SupplierKeyProvisioning";
|
||||
|
||||
var res = await RestAPI.PutAsync<MasterEcuKey.Request_SupplierKeyProvisioning_Result, MasterEcuKey.Response_SupplierKeyProvisioning_Result>(url, request);
|
||||
return res;
|
||||
}
|
||||
|
||||
//3. SupplierSymmKey
|
||||
public static async Task<SupplierSymmKey.Response_SupplierKeyProvisioning> SupplierSymmKey_SupplierKeyProvisioning(string host, SupplierSymmKey.Request_SupplierKeyProvisioning request)
|
||||
{
|
||||
string url = $"https://{host}:{Port}/kms/SupplierSymmKey/SupplierKeyProvisioning";
|
||||
|
||||
var res = await RestAPI.PostAsync<SupplierSymmKey.Request_SupplierKeyProvisioning, SupplierSymmKey.Response_SupplierKeyProvisioning>(url, request);
|
||||
return res;
|
||||
}
|
||||
|
||||
public static async Task<SupplierSymmKey.Response_SupplierKeyProvisioning_Result> SupplierSymmKey_SupplierKeyProvisioningResult(string host, SupplierSymmKey.Request_SupplierKeyProvisioning_Result request)
|
||||
{
|
||||
string url = $"https://{host}:{Port}/kms/SupplierSymmKey/SupplierKeyProvisioning";
|
||||
|
||||
var res = await RestAPI.PutAsync<SupplierSymmKey.Request_SupplierKeyProvisioning_Result, SupplierSymmKey.Response_SupplierKeyProvisioning_Result>(url, request);
|
||||
return res;
|
||||
}
|
||||
|
||||
public static async Task<SupplierSymmKey.Response_SupplierKeySyncValue> SupplierSymmKey_SupplierKeySyncValue(string host, SupplierSymmKey.Request_SupplierKeySyncValue request)
|
||||
{
|
||||
string url = $"https://{host}:{Port}/kms/SupplierSymmKey/SupplierKeySyncValue";
|
||||
|
||||
var res = await RestAPI.PostAsync<SupplierSymmKey.Request_SupplierKeySyncValue, SupplierSymmKey.Response_SupplierKeySyncValue>(url, request);
|
||||
return res;
|
||||
}
|
||||
|
||||
public static async Task<SupplierSymmKey.Response_SupplierKeySyncValue_Result> SupplierSymmKey_SupplierKeySyncValueResult(string host, SupplierSymmKey.Request_SupplierKeySyncValue_Result request)
|
||||
{
|
||||
string url = $"https://{host}:{Port}/kms/SupplierSymmKey/SupplierKeySyncValue";
|
||||
|
||||
var res = await RestAPI.PutAsync<SupplierSymmKey.Request_SupplierKeySyncValue_Result, SupplierSymmKey.Response_SupplierKeySyncValue_Result>(url, request);
|
||||
return res;
|
||||
}
|
||||
|
||||
//4.SecOCKey
|
||||
public static async Task<SecOCKey.Response_SupplierKeyProvisioning> SecOCKey_SupplierKeyProvisioning(string host, SecOCKey.Request_SupplierKeyProvisioning request)
|
||||
{
|
||||
string url = $"https://{host}:{Port}/kms/SecOCKey/SupplierKeyProvisioning";
|
||||
|
||||
var res = await RestAPI.PostAsync<SecOCKey.Request_SupplierKeyProvisioning, SecOCKey.Response_SupplierKeyProvisioning>(url, request);
|
||||
return res;
|
||||
}
|
||||
|
||||
public static async Task<SecOCKey.Response_SupplierKeyProvisioning_Result> SecOCKey_SupplierKeyProvisioningResult(string host, SecOCKey.Request_SupplierKeyProvisioning_Result request)
|
||||
{
|
||||
string url = $"https://{host}:{Port}/kms/SecOCKey/SupplierKeyProvisioning";
|
||||
|
||||
var res = await RestAPI.PutAsync<SecOCKey.Request_SupplierKeyProvisioning_Result, SecOCKey.Response_SupplierKeyProvisioning_Result>(url, request);
|
||||
return res;
|
||||
}
|
||||
|
||||
public static async Task<SecOCKey.Response_SupplierKeySyncValue> SecOCKey_SupplierKeySyncValue(string host, SecOCKey.Request_SupplierKeySyncValue request)
|
||||
{
|
||||
string url = $"https://{host}:{Port}/kms/SecOCKey/SupplierKeySyncValue";
|
||||
|
||||
var res = await RestAPI.PostAsync<SecOCKey.Request_SupplierKeySyncValue, SecOCKey.Response_SupplierKeySyncValue>(url, request);
|
||||
return res;
|
||||
}
|
||||
|
||||
public static async Task<SecOCKey.Response_SupplierKeySyncValue_Result> SecOCKey_SupplierKeySyncValueResult(string host, SecOCKey.Request_SupplierKeySyncValue_Result request)
|
||||
{
|
||||
string url = $"https://{host}:{Port}/kms/SecOCKey/SupplierKeySyncValue";
|
||||
|
||||
var res = await RestAPI.PutAsync<SecOCKey.Request_SupplierKeySyncValue_Result, SecOCKey.Response_SupplierKeySyncValue_Result>(url, request);
|
||||
return res;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user