wolverineo250kr/yii2-pevnev-security-helper

Security helper based on Yii2 framework. Returns an encoded string by key, aveliable to be used as a GET parameter.

v1.0.5 2020-03-10 11:28 UTC

This package is auto-updated.

Last update: 2024-05-01 00:09:38 UTC


README

Description

Based on Yii2 security function encryptByKey, this helper returns an encoded string aveliable to be used as a GET parameter.

Install

composer require "wolverineo250kr/yii2-pevnev-security-helper":"v1.0.4"

Usage

To encode string call in your Yii2 app following php command with your encryption key:
\wolverineo250kr\helpers\security\SecurityHelper::encodeStringByKey('Your string', 'yourKey');

To decode string call in your Yii2 app following php command with your encryption key:
\wolverineo250kr\helpers\security\SecurityHelper::decodeStringByKey('5arqQR_W4GYzB5uIwNDUfDg4YTcyZjFiMzg3OTQwN2YzOTRjMTEzODlmODVjZjIxOGQ0ODUzZDNhNmEyODg3MDA3OGZiMzZkZDhkMGVhNjD9yDn2R8FySgjbfIzuISO3miPmWLSBFz7f0wWMbrNYRw', 'yourKey');