2017 © Pedro Peláez
 

library quill

Library for quickly and easily writing data to a Chronicle instance

image

paragonie/quill

Library for quickly and easily writing data to a Chronicle instance

  • Tuesday, April 10, 2018
  • by paragonie-scott
  • Repository
  • 4 Watchers
  • 14 Stars
  • 653 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 5 Versions
  • 289 % Grown

The README.md

Quill

Build Status Latest Stable Version Latest Unstable Version License Downloads, (*1)

Quill is a library for publishing data to a Chronicle instance. Requires PHP 7.1 or newer. PHP 7.2+ is recommended., (*2)

A monolog handler is also available., (*3)

Installing

composer require paragonie/quill

Usage

<?php

use ParagonIE\ConstantTime\Base64UrlSafe;
use ParagonIE\Quill\Quill;
use ParagonIE\Sapient\CryptographyKeys\{
    SigningSecretKey,
    SigningPublicKey
};

$quill = (new Quill())
    ->setChronicleURL('https://chronicle-public-test.paragonie.com/chronicle')
    ->setServerPublicKey(
        new SigningPublicKey(
            Base64UrlSafe::decode('3BK4hOYTWJbLV5QdqS-DFKEYOMKd-G5M9BvfbqG1ICI=')
        )
    )
    ->setClientID('**Your Client ID provided by the Chronicle here**')
    ->setClientSecretKey(
        new SigningSecretKey('/* Loaded from the filesystem or something. */')
    );

$quill->write("Important security notice goes here.");

Writing Data (Unencrypted)

There are two main API methods that do the same thing but differ in their return values:, (*4)

  • write(string $input): ResponseInterface
    • Returns the PSR-7 Response object, or throws an exception
  • blindWrite(string $input): bool
    • Returns TRUE or FALSE

Writing Data (Symmetric Encryption)

If you want to encrypt your messages using a shared encryption key:, (*5)

  • writeEncrypted(string $input, SharedEncryptionKey $key): ResponseInterface
    • Returns the PSR-7 Response object, or throws an exception
  • blindWriteEncrypted(string $input, SharedEncryptionKey $key): bool
    • Returns TRUE or FALSE

Writing Data (Asymmetric Encryption)

If you want to encrypt your messages using a public-key cryptography:, (*6)

  • writeSealed(string $input, SealingPublicKey $key): ResponseInterface
    • Returns the PSR-7 Response object, or throws an exception
  • blindWriteSealed(string $input, SealingPublicKey $key): bool
    • Returns TRUE or FALSE

The Versions

10/04 2018
22/01 2018
19/01 2018

v0.3.0

0.3.0.0

Library for quickly and easily writing data to a Chronicle instance

  Sources   Download

ISC

The Requires

 

The Development Requires

26/12 2017

v0.2.0

0.2.0.0

Library for quickly and easily writing data to a Chronicle instance

  Sources   Download

ISC

The Requires

 

The Development Requires

15/12 2017

v0.1.0

0.1.0.0

Library for quickly and easily writing data to a Chronicle instance

  Sources   Download

ISC

The Requires

 

The Development Requires