lib/private/Security/IdentityProof/Signer.php
/**
	 * Whether the data is signed properly
	 *
	 * @param array $data
	 * @return bool
	 */
Whether the data is signed properly
@param array $data
@return bool
Whether the data is signed properly @param array $data @return bool
public function verify(array $data) {
		if(isset($data['message'])
			&& isset($data['signature'])
			&& isset($data['message']['signer'])
		) {
			$location = strrpos($data['message']['signer'], '@');
			$userId = substr($data['message']['signer'], 0, $location);
			$user = $this->userManager->get($userId);
			if($user !== null) {
				$key = $this->keyManager->getKey($user);
				return (bool)openssl_verify(
					json_encode($data['message']),
					base64_decode($data['signature']),
					$key->getPublic(),
					OPENSSL_ALGO_SHA512
				);
			}
		}
		return false;
	}
public function verify ( array $ data ) { if ( isset ( $ data [ 'message' ] ) && isset ( $ data [ 'signature' ] ) && isset ( $ data [ 'message' ] [ 'signer' ] ) ) { $ location = strrpos ( $ data [ 'message' ] [ 'signer' ] , '@' ) ; $ userId = substr ( $ data [ 'message' ] [ 'signer' ] , 0 , $ location ) ; $ user = $ this -> userManager -> get ( $ userId ) ; if ( $ user !== null ) { $ key = $ this -> keyManager -> getKey ( $ user ) ; return ( bool ) openssl_verify ( json_encode ( $ data [ 'message' ] ) , base64_decode ( $ data [ 'signature' ] ) , $ key -> getPublic ( ) , OPENSSL_ALGO_SHA512 ) ; } } return false ; }
Whether the data is signed properly
 @param array $data
 @return bool
Whether the data is signed properly @param array $data @return bool