2017 © Pedro Peláez
 

library salmon

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

image

indieweb/salmon

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

  • Wednesday, August 29, 2012
  • by barnabywalters
  • Repository
  • 17 Watchers
  • 3 Stars
  • 20 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

salmon-php

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., (*1)

Contains:, (*2)

Installation

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

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

    {
        "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., (*5)

  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., (*6)

<?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!
}

The Versions

29/08 2012

dev-master

9999999-dev

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

  Sources   Download

indieweb ostatus salmon magic signatures

29/08 2012

v0.1.0

0.1.0.0

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

  Sources   Download

indieweb ostatus salmon magic signatures