C# 클래스 Example.Example.VerifyDemo

파일 보기 프로젝트 열기: PingPlusPlus/pingpp-csharp

공개 메소드들

메소드 설명
Example ( ) : bool

本示例介绍如何验证 webhooks 签名。 需要注意的是 requestBody 必须是接收到的原始数据; 签名在 header 里的 x-pingplusplus-signature 字段里; 公钥在管理平台里面,需要登陆去获取。

ReadFileToString ( string path ) : string
VerifySignedHash ( string strDataToVerify, string strSignedData, string strPublicKeyFilePath ) : bool

메소드 상세

Example() 공개 정적인 메소드

本示例介绍如何验证 webhooks 签名。 需要注意的是 requestBody 必须是接收到的原始数据; 签名在 header 里的 x-pingplusplus-signature 字段里; 公钥在管理平台里面,需要登陆去获取。
public static Example ( ) : bool
리턴 bool

ReadFileToString() 공개 정적인 메소드

public static ReadFileToString ( string path ) : string
path string
리턴 string

VerifySignedHash() 공개 정적인 메소드

public static VerifySignedHash ( string strDataToVerify, string strSignedData, string strPublicKeyFilePath ) : bool
strDataToVerify string
strSignedData string
strPublicKeyFilePath string
리턴 bool