承接 linkorb/sops-php 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

linkorb/sops-php

最新稳定版本:v1.0.2

Composer 安装命令:

composer require linkorb/sops-php

包简介

SOPS wrapper library for PHP

README 文档

README

SOPS is an editor of encrypted files that supports YAML, JSON, ENV, INI and BINARY formats and encrypts with AWS KMS, GCP KMS, Azure Key Vault, age, and PGP.

This repository provides a SOPS wrapper PHP library for PHP applications.

Installation

composer require linkorb/sops-php

Example

use linkORB\Shipyard\Sops as SopsWrapper;

// encrypt a file using a encryption method
$sops = new SopsWrapper();
$data = $sops->encrypt($key, $filepath, $method);

// encrypt a file using a encryption method
$sops = new SopsWrapper();
$data = $sops->decrypt($filepath);

CLI usage

You can use the bin/sops-php CLI application to run commands for encryption/decryption.

The application needs a couple of configuration directives to work:

Example commands

# encryption
php bin/sops-php sops:encrypt -k age1tjzcc45rq3rlnt0hd6a77w9p90pdzmq3df7pdgtkrhynyxs25y2qltryk0 -m age  composer.json

#decryption
php bin/sops-php sops:decrypt composer.sops.json

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-10-26