xlerr / desensitise
This package is abandoned and no longer maintained.
No replacement package was suggested.
This package has no released version yet, and little information is available.
README
配置
return [ 'components' => [ Desensitise::componentName() => [ 'class' => Desensitise::class, 'baseUri' => 'http://localhost/', ], ], ];
使用
$hash = Desensitise::instance()->execDecrypt('enc_01_1293051090349_123', true);
Desensitise::instance()->encrypt([ ['13123456789', Desensitise::TYPE_PHONE_NUMBER], ['510121199901011234', Desensitise::TYPE_IDENTITY_NUMBER], ], 0, function ($response) { throw new EncryptException($response['message']); });