paragonie/quill 问题修复 & 功能扩展

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

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

paragonie/quill

最新稳定版本:v0.7.0

Composer 安装命令:

composer require paragonie/quill

包简介

Library for quickly and easily writing data to a Chronicle instance

README 文档

README

Build Status Latest Stable Version Latest Unstable Version License Downloads

Quill is a library for publishing data to a Chronicle instance. Requires PHP 7.1 or newer. PHP 7.2+ is recommended.

A monolog handler is also available.

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:

  • 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:

  • 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:

  • 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

统计信息

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

GitHub 信息

  • Stars: 21
  • Watchers: 5
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: ISC
  • 更新时间: 2017-12-12

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固