indieweb/salmon 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

indieweb/salmon

Composer 安装命令:

composer require indieweb/salmon

包简介

A set of PSR-0 autoloadable classes for dealing with the Salmon protocol and magic signatures

README 文档

README

Some PHP classes for dealing with Salmon, both original code and modified forks of stuff which is elsewhere. Packaged up as a Composer package, all PSR-0 compliant for awesome autoloading.

Contains:

Installation

Install using Composer. If you don't already have composer, download it per their instructions. Then:

  1. Add indieweb/salmon to your project's composer.json file, so it looks a bit like this:

     {
     	"require" : {
     		"indieweb/salmon": "*"
     	},
     	"minimum-stability": "dev"
     }
    

    If you've never used composer, this is just specifying that your project needs the indieweb/salmon package in order to work, it doesn't matter which version you get, and it's all right to use packages which are in development.

  2. Run php composer.phar update

  3. Provided there were no errors, you should now have indieweb/salmon installed

Usage

indieweb/push supports psr-0 autoloading, so using the classes is easy provided you're familiar with PHP namespaces.

<?php
// This script uses some indieweb/salmon code

use indieweb\Salmon\MagicSignatures;

$ms = new MagicSignatures;

$json_magic_envelope = $ms -> sign('Here is some data', 'text/text', '/path/to/your/key/private.pem', '');

if ($ms -> verify($json_magic_envelope, '/path/to/your/key/public.pem'))
{
	// Verified! The envelope was signed by the issuer
}
else
{
	// Verification failed - the envelope was either incorrectly handled or has been modified in transit!
}

统计信息

  • 总下载量: 29
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 3
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 3
  • Watchers: 12
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: Unknown
  • 更新时间: 2012-08-29

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固