Emarref\Jwt\Encryption\EncryptionInterface::encrypt PHP Method

encrypt() public method

public encrypt ( string $value ) : string
$value string
return string
    public function encrypt($value);

Usage Example

Example #1
0
File: Jws.php Project: emarref/jwt
 public function sign(Token $token)
 {
     $token->addHeader(new Algorithm($this->encryption->getAlgorithmName()));
     $rawSignature = $this->getUnsignedValue($token);
     $signature = $this->encryption->encrypt($rawSignature);
     $token->setSignature($signature);
 }