Class TGMDK_MerchantUtility

Description

マーチャント向けセキュリティ関連ユーティリティクラス

  • author: VeriTrans Inc.
  • copyright: VeriTrans Inc.
  • access: public

Located in /TGMDK_MerchantUtility.php (line 16)


	
			
Method Summary
static array|null analyzeMerchantData (string $md)
static bool checkMessage (string $msgBody, string $sContentHmac)
static bool checkMessageBySecretKey (string $secretKey, string $msgBody, string $sContentHmac)
static string createMerchantData (array $data)
static bool|string getSecret (string $sContentHmac)
static string getTripartiteAuthHash ()
static string getTripartiteSjisUrl ()
static string getTripartiteUrl ()
static string sign (string $value, string $key)
static bool verifySign (string $value, string $key, string $originalDigest)
Methods
static method analyzeMerchantData (line 399)

マーチャントデータ(MD)の解析をする。

  • return: マーチャントデータの元情報
    ハッシュコードが一致しなかった場合はNULLを返す
  • access: public
static array|null analyzeMerchantData (string $md)
  • string $md: マーチャントデータ
static method checkMessage (line 133)

署名を検証する。

  • return: 検証の対象となる署名文字列
  • access: public
static bool checkMessage (string $msgBody, string $sContentHmac)
  • string $msgBody: 署名の元となる文字列
  • string $sContentHmac: 検証の対象となる署名文字列
static method checkMessageBySecretKey (line 183)

署名を検証する。

  • access: public
static bool checkMessageBySecretKey (string $secretKey, string $msgBody, string $sContentHmac)
  • string $secretKey: マーチャント認証鍵
  • string $msgBody: 署名の元となる文字列
  • string $sContentHmac: 検証の対象となる署名文字列
static method createMerchantData (line 347)

マーチャントデータ(MD)を生成する。

  • return: マーチャントデータ
  • access: public
static string createMerchantData (array $data)
  • array $data: マーチャントデータを生成するためにマーチャントが設定したデータ
static method getSecret (line 94)

Content-HMAC文字列からマーチャントシークレットを取得する。

  • return: マーチャントシークレット文字列
  • access: public
static bool|string getSecret (string $sContentHmac)
  • string $sContentHmac: 検証の対象となる署名文字列
static method getTripartiteAuthHash (line 25)

3者間通信用にメッセージダイジェストを取得する。

  • return: 3者間通信用にメッセージダイジェスト
  • throws: TGMDK_Exception
  • access: public
static string getTripartiteAuthHash ()
static method getTripartiteSjisUrl (line 80)

3者間通信用のリダイレクト先URLを取得する。(Shift_JIS版)

  • return: 3者間通信用のリダイレクト先URL
  • access: public
static string getTripartiteSjisUrl ()
static method getTripartiteUrl (line 67)

3者間通信用のリダイレクト先URLを取得する。(UTF-8版)

  • return: 3者間通信用のリダイレクト先URL
  • access: public
static string getTripartiteUrl ()
static method sign (line 293)

引数文字列よりメッセージダイジェストを算出する。

  • return: ダイジェスト値
  • throws: TGMDK_Exception
  • access: public
static string sign (string $value, string $key)
  • string $value: メッセージダイジェスト算出の対象となる文字列
  • string $key: メッセージダイジェスト算出キー
static method verifySign (line 327)

valueで指定された文字列からダイジェスト値を算出し、originalDigest値と比較する。

  • return: true 一致 or false 不一致
  • access: public
static bool verifySign (string $value, string $key, string $originalDigest)
  • string $value: メッセージダイジェスト算出の基になる文字列
  • string $key: メッセージダイジェスト算出キー
  • string $originalDigest: 事前に算出済のダイジェスト値

Documentation generated on Tue, 12 Mar 2024 14:05:22 +0900 by phpDocumentor 1.4.4