<commit_before><?php
/*
 * MagicTelecomAPILib
 *
 * This file was automatically generated by APIMATIC BETA v2.0 on 12/08/2015
 */

namespace MagicTelecomAPILib;

class CustomAuthUtility {

    public static $username = '<EMAIL>';
    public static $apiToken = '<PASSWORD>';

    /**
    * Appends the necessary Custom Authentication credentials for making this authorized call
    * @param HttpRequest $request The out going request to access the resource
    */
    public static function appendCustomAuthParams($request)
    {
        $request.headers(array("X-WSSE" => $this->generateWSSEHeader(self::$username, self::$apiToken)));
    }

    private function generateWSSEHeader($username, $password)
    {
        $strNonce = sha1(uniqid(null, true).time());
        $objTimestamp = new \DateTime();
        $strTimestamp = $objTimestamp->format(\DateTime::ATOM);

        $strDigest = base64_encode(sha1($strNonce.$strTimestamp.$strPassword, true));

        $strHeader = 'UsernameToken Username="'.$strUsername.'", PasswordDigest="'.$strDigest.'", Nonce="'.$strNonce.'", Created="'.$strTimestamp.'"';

        return $strHeader;
    }<commit_msg>update variables<commit_after><?php
/*
 * MagicTelecomAPILib
 *
 * This file was automatically generated by APIMATIC BETA v2.0 on 12/08/2015
 */

namespace MagicTelecomAPILib;

class CustomAuthUtility {

    public static $username = '<EMAIL>';
    public static $apiToken = '<PASSWORD>';

    /**
    * Appends the necessary Custom Authentication credentials for making this authorized call
    * @param HttpRequest $request The out going request to access the resource
    */
    public static function appendCustomAuthParams($request)
    {
        $request.headers(array("X-WSSE" => $this->generateWSSEHeader(self::$username, self::$apiToken)));
    }

    private function generateWSSEHeader($strUsername, $strPassword)
    {
        $strNonce = sha1(uniqid(null, true).time());
        $objTimestamp = new \DateTime();
        $strTimestamp = $objTimestamp->format(\DateTime::ATOM);

        $strDigest = base64_encode(sha1($strNonce.$strTimestamp.$strPassword, true));

        $strHeader = 'UsernameToken Username="'.$strUsername.'", PasswordDigest="'.$strDigest.'", Nonce="'.$strNonce.'", Created="'.$strTimestamp.'"';

        return $strHeader;
    }
{'fraction_non_alphanumeric': 0.13748378728923477, 'fraction_numerical': 0.012105490704712495, 'mean_word_length': 3.8410041841004183, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '484822', 'n_tokens_mistral': 672, 'n_tokens_neox': 658, 'n_words': 155}