GSSAPIContext
PHP Manual

GSSAPIContext::wrap

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

GSSAPIContext::wrapWraps a message

Description

public bool GSSAPIContext::wrap ( string $input , string &$output [, boolean $encrypt ] )

Wraps a message, which means that the message and a MIC will be combined into a token which may be passed to a remote party. Optionally the message can be also encrypted.

Parameters

input

Message to wrap

output

Wrapped token

encrypt

Whether to encrypt the message

Return Values

Returns true if successful and false otherwise.

Examples

Example #1 GSSAPIContext::wrap() 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