PHP code example of linkorb / sops-php

1. Go to this page and download the library: Download linkorb/sops-php library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

linkorb / sops-php example snippets


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);



composer