Your IP : 216.73.216.79


Current Path : /var/www/html/portalv4/common/components/
Upload File :
Current File : /var/www/html/portalv4/common/components/AiDynawebApi.php

<?php
namespace common\components;

use Yii;

class AiDynawebApi {

	public static function hash($message, $key) {
		return base64_encode(hash_hmac('sha256', $message, $key, true));
	}

	public static function getToken($context, $nonce) {
		return self::hash($context . $nonce, Yii::$app->params['fileqna']['SECRET_KEY']);
	}
}