Exemplo n.º 1
0
 function encrypt($public_key_or_secret, $algorithm = 'RSA1_5', $encryption_method = 'A128CBC-HS256')
 {
     $jwe = new JOSE_JWE($this);
     $jwe->encrypt($public_key_or_secret, $algorithm, $encryption_method);
     return $jwe;
 }
Exemplo n.º 2
0
 function testEncryptUnknown_A128CBCHS256()
 {
     $jwe = new JOSE_JWE($this->plain_text);
     $this->setExpectedException('JOSE_Exception_UnexpectedAlgorithm');
     $jwe->encrypt($this->rsa_keys['public'], 'Unknown');
 }