settings/Controller/UsersController.php
/**
	 * sign message with users private key
	 *
	 * @param IUser $user
	 * @param string $message
	 *
	 * @return string base64 encoded signature
	 */
sign message with users private key
@param IUser $user
@param string $message

@return string base64 encoded signature
sign message with users private key @param IUser $user @param string $message @return string base64 encoded signature
protected function signMessage(IUser $user, $message) {
		$privateKey = $this->keyManager->getKey($user)->getPrivate();
		openssl_sign(json_encode($message), $signature, $privateKey, OPENSSL_ALGO_SHA512);
		$signatureBase64 = base64_encode($signature);
		return $signatureBase64;
	}
protected function signMessage ( IUser $ user , $ message ) { $ privateKey = $ this -> keyManager -> getKey ( $ user ) -> getPrivate ( ) ; openssl_sign ( json_encode ( $ message ) , $ signature , $ privateKey , OPENSSL_ALGO_SHA512 ) ; $ signatureBase64 = base64_encode ( $ signature ) ; return $ signatureBase64 ; }
sign message with users private key
 @param IUser $user
 @param string $message
sign message with users private key @param IUser $user @param string $message