You are here

public static function LingotekSession::create_mac in Lingotek Translation 7.4

Same name and namespace in other branches
  1. 6 lingotek.session.inc \LingotekSession::create_mac()
  2. 7.7 lingotek.session.inc \LingotekSession::create_mac()
  3. 7.2 lingotek.session.inc \LingotekSession::create_mac()
  4. 7.3 lingotek.session.inc \LingotekSession::create_mac()
  5. 7.5 lingotek.session.inc \LingotekSession::create_mac()
  6. 7.6 lingotek.session.inc \LingotekSession::create_mac()
1 call to LingotekSession::create_mac()
LingotekSession::login in ./lingotek.session.inc

File

./lingotek.session.inc, line 227
Handles api calls, logging in and logging out of LingoTek

Class

LingotekSession

Code

public static function create_mac($json_msg) {
  $resp = base64_encode(hash_hmac('sha256', $json_msg, pack('H*', variable_get('lingotek_login_key', '')), TRUE));
  return $resp;
}