src/Crypt/SecureCookie.php
public static function create($id,$guid,$context_id,$debug=false) {
        global $CFG;
        $pt = $CFG->cookiepad.'::'.$id.'::'.$guid.'::'.$context_id;
        if ( $debug ) echo("PT1: $pt\n");
        $ct = \Tsugi\Crypt\AesCtr::encrypt($pt, $CFG->cookiesecret, 256) ;
        return $ct;
    }
public static function create($id,$guid,$context_id,$debug=false) {
        global $CFG;
        $pt = $CFG->cookiepad.'::'.$id.'::'.$guid.'::'.$context_id;
        if ( $debug ) echo("PT1: $pt\n");
        $ct = \Tsugi\Crypt\AesCtr::encrypt($pt, $CFG->cookiesecret, 256) ;
        return $ct;
    }
public static function create ( $ id , $ guid , $ context_id , $ debug = false ) { global $ CFG ; $ pt = $ CFG -> cookiepad . '::' . $ id . '::' . $ guid . '::' . $ context_id ; if ( $ debug ) echo ( "PT1: $pt\n" ) ; $ ct = \ Tsugi \ Crypt \ AesCtr :: encrypt ( $ pt , $ CFG -> cookiesecret , 256 ) ; return $ ct ; }
Utility code to deal with Secure Cookies.
Utility code to deal with Secure Cookies .