GSSAPIContext
PHP Manual

GSSAPIContext::getMic

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

GSSAPIContext::getMicCalculate a MIC on a given message

Description

public string GSSAPIContext::getMic ( string $message )

Calculate a MIC on a given message. For remote verification both the message and the returned MIC have to be passed to the remote party.

Parameters

message

Message to calculate MIC on.

Return Values

Returns the MIC valid for the current GSSAPI context.

Examples

Example #1 GSSAPIContext::getMic() example

<?php
// assume $cgssapi is the initiator of some context
// and $sgssapi is the acceptor of the context

$message 'foo';

$mic $cgssapi->getMic($message);

$sgssapi->verifyMic($message$mic); // will return true if valid
?>

See Also


GSSAPIContext
PHP Manual