안녕하세요. 구글링을 아무리 해봐도 찾을수가 없어 문의드립니다.
아래 소스는 php와 파이썬 인데요.
이 소스를 asp로 변경하려고 하는데 가능한지 궁금합니다.
<PHP 함수>
protected function generateSignature($timestamp, $method, $path)
{
$sign = $timestamp . "." . $method . "." . $path;
echo "sign = " . $sign . "\n";
$signature = hash_hmac('sha256', $sign, $this->secretKey, true);
return base64_encode($signature);
}
<파이썬 함수>
def generate(timestamp, method, uri, secret_key):
message = "{}.{}.{}".format(timestamp, method, uri)
hash = hmac.new(bytes(secret_key, "utf-8"), bytes(message, "utf-8"), hashlib.sha256)
hash.hexdigest()
return base64.b64encode(hash.digest())
위와 같은 함수를 asp로도 구현이 가능할까요?
염치 불구하고 도움 요청드립니다.