Exemplo n.º 1
0
 public function encode($msg)
 {
     return TPSecurityUtils::encrypt($this->privateKey, $msg);
 }
 /**
  * Builds the encrypted user ref string.
  *
  * @param string $privateKey The private key to use when encrypting the user ref
  *
  * @return string
  * @throws Exception
  */
 public function build($privateKey)
 {
     $this->set(self::TIMESTAMP, time());
     return TPSecurityUtils::encrypt($privateKey, json_encode($this->data));
 }