PHPackages                             vecode/hideout-php - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. vecode/hideout-php

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

vecode/hideout-php
==================

PHP SDK for Vecode Hideout

1.0.1(4y ago)04MITPHPPHP &gt;=7.1

Since Mar 25Pushed 3y ago1 watchersCompare

[ Source](https://github.com/vecodenet/hideout-php)[ Packagist](https://packagist.org/packages/vecode/hideout-php)[ RSS](/packages/vecode-hideout-php/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)Dependencies (4)Versions (3)Used By (0)

   ![](.github/logo.svg)hideout-php
===========

[](#hideout-php)

PHP SDK for Vecode Hideout

This is a slim library for interacting with a Vecode Hideout server, so you must have a working instance in order to use this library.

To get started you will need to configure the server and add a client so that you get a client token, please refer to its respective documentation if you need more details.

Also remember to always connect to Vecode Hideout instances using `https`.

### Installing

[](#installing)

First require `vecode/hideout-php` with Composer.

### Basic usage

[](#basic-usage)

Now get an instance of `Hideout` with the `newInstance` method and set the server location and client token:

```
use Hideout\Hideout;

$server = 'https://hideout.my-server.com';
$token = 'xxxxx.yyyyyyyyyyyyy';

$hideout = Hideout::newInstance()
  ->setServer($server)
  ->setToken($token);
```

Once you have your `Hideout` object you may start interacting with the server.

### Generating keys

[](#generating-keys)

In addition to the client token, you will require a secret key (or several ones) to store and retrieve secrets on the server, so there's a handy endpoint for getting a valid key.

Is as simple as calling the `generate` method:

```
use Hideout\Hideout;

$server = 'https://hideout.my-server.com';
$token = 'xxxxx.yyyyyyyyyyyyy';

$hideout = Hideout::newInstance()
  ->setServer($server)
  ->setToken($token);

$key = $hideout->generate();
```

Once you got the key it must be saved in a safe place. For example you can set it as an environment variable so that you have it at hand later.

**Never store it in a public directory that can be accessed from the web.**

### Storing secrets

[](#storing-secrets)

With your key you can create secrets, by using the `store` method and passing the `key` and secret `data`:

```
use Hideout\Hideout;

$server = 'https://hideout.my-server.com';
$token = 'xxxxx.yyyyyyyyyyyyy';
$key = getenv('my_secret_key');

$hideout = Hideout::newInstance()
  ->setServer($server)
  ->setToken($token);

$data = 'Lorem ipsum dolor sit amet, consectetur adipisicing elit. Beatae atque officiis natus voluptatum debitis sunt.';
$entry = $hideout->store($key, $data); // $entry would be 'xxxxxyyyyzzz' for example
```

In this case you will receive the `entry` identifier of the secret once it is stored on the server. With this identifier you may retrieve it later.

### Retrieveing secrets

[](#retrieveing-secrets)

To get the secrets back just call the `retrieve` method, this time you must pass the `key` and the `entry` identifier:

```
use Hideout\Hideout;

$server = 'https://hideout.my-server.com';
$token = 'xxxxx.yyyyyyyyyyyyy';
$key = getenv('my_secret_key');

$hideout = Hideout::newInstance()
  ->setServer($server)
  ->setToken($token);

$entry = 'xxxxxyyyyzzz';
$data = $hideout->retrieve($key, $entry); // $data would be 'Lorem ipsum dolor sit amet, consectetur adipisicing elit. Beatae atque officiis natus voluptatum debitis sunt.'
```

Then you will receive the original data.

### Deleting secrets

[](#deleting-secrets)

There's also the option to delete any secret by calling the `delete` method with the `entry` identifier:

```
use Hideout\Hideout;

$server = 'https://hideout.my-server.com';
$token = 'xxxxx.yyyyyyyyyyyyy';

$hideout = Hideout::newInstance()
  ->setServer($server)
  ->setToken($token);

$entry = 'xxxxxyyyyzzz';
$hideout->delete($entry); // Just returns TRUE or FALSE
```

### Troubleshooting

[](#troubleshooting)

The most common problem is with `https`. This library uses `biohzrdmx/curly-php` and it requires a properly configured server to work. Please [refer to its documentation](https://github.com/biohzrdmx/curly-php) to get more details.

Otherwise please open an issue and we will gladly help you.

### Licensing

[](#licensing)

This software is released under the MIT license.

Copyright © 2022 biohzrdmx

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

### Credits

[](#credits)

**Lead coder:** biohzrdmx [github.com/biohzrdmx](http://github.com/biohzrdmx)

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity45

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~11 days

Total

2

Last Release

1504d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/44b968bb45d47a621ce8e81c422ef4c126316a702156a7faf96df75610cc0d45?d=identicon)[biohzrdmx](/maintainers/biohzrdmx)

---

Top Contributors

[![biohzrdmx](https://avatars.githubusercontent.com/u/2053303?v=4)](https://github.com/biohzrdmx "biohzrdmx (7 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/vecode-hideout-php/health.svg)

```
[![Health](https://phpackages.com/badges/vecode-hideout-php/health.svg)](https://phpackages.com/packages/vecode-hideout-php)
```

###  Alternatives

[smile/module-multi-coupon

Extension of Magento2 Sales Rule to allow multiple coupon usage.

102.9k](/packages/smile-module-multi-coupon)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
