- try {
- $env = $magic_env->signMessage($text, 'application/atom+xml', $signer_uri);
- } catch (Exception $e) {
- common_log(LOG_ERR, "Salmon signing failed: ". $e->getMessage());
- return $text;
- }
- return $magic_env->unfold($env);
- }
-
-
- public function verifyMagicEnv($dom)
- {
- $magic_env = new MagicEnvelope();
-
- $env = $magic_env->fromDom($dom);
-
- return $magic_env->verify($env);