GSSAPIContext
PHP Manual

GSSAPIContext::unwrap

(No version information available, might be only in CVS)

GSSAPIContext::unwrapUnwraps a previously wrapped message

Description

public bool GSSAPIContext::unwrap ( string $input , string &$output )

Unwraps a previously wrapped message, which means that the embedded MIC will be verified and the message possibly be decrypted.

Parameters

input

Input token

output

Message (possibly decrypted)

Return Values

Returns true if successful and false otherwise.

Examples

Example #1 GSSAPIContext::unwrap() example

<?php
/* ... */

$message 'test';
$decoded '';
$token '';


$sgssapi->wrap($message$tokentrue); // adds a MIC and encrypts $message

$cgssapi->unwrap($token$decoded); 
// returns true when the embedded MIC is valid
// $decoded will contain test
?>

See Also


GSSAPIContext
PHP Manual