Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Eos Bundle Laravel Package

b3da/eos-bundle

View on GitHub
Deep Wiki
Context7

b3da/EasyOpenSslBundle

Symfony Bundle for easy OpenSSL encryption, decryption and key pair generation.

Dependencies:

  • symfony/framework-standard-edition ">=2.8|~3.1"

Instalation:

  • create project with Symfony framework

  • composer require b3da/eos-bundle "dev-master"

  • AppKernel.php:

new b3da\EasyOpenSslBundle\b3daEasyOpenSslBundle(),
  • parameters.yml(.dist):
# EasyOpenSSL encryption method
eos_enc_method: aes-256-cbc
# ...
  • (you can extend base Client and Message entities from b3da\EasyOpenSslBundle namespace)

  • update your schema

Usage:

  • new service b3da_easy_open_ssl.eos is available for OpenSSL operations
$eos = $this->get('b3da_easy_open_ssl.eos');
  • create Client example (FooController)
$client = new Client();
$client = $eos->generateKeyPairForClient($client);
if (!$client) {
   // err generating keypair
}
// persist Client with keys
  • encrypt data by Client's private key example (FooController)
$message = $eos->encrypt($client, 'msg data .. foo bar baz');
  • decrypt data by Client's public key example (FooController)
$decryptedData = $eos->decrypt($message);
// $decryptedData === 'msg data .. foo bar baz';

simple API for basic tasks (optional)
  • import routes into routing.yml:
b3da_easy_open_ssl:
    resource: "@b3daEasyOpenSslBundle/Controller/"
    type:     annotation
    prefix:   /eos/
  • /eos/msg-api/client/create/ [POST]
Response:

{"status":"success","id":"3ead5521-2fbc-11e6-834a-f0def1ff5901"}

or

{"status":"error","details":"key pair generating failed"}
  • /eos/msg-api/client/export-public/{id}/ [GET]
Response:

{"status":"success","data":{"id":"3ead5521-2fbc-11e6-834a-f0def1ff5901","pubkey":"LS0tLS1CR .. S0tLQ=="}}

or

{"status":"error","details":"no client for id"}
  • /eos/msg-api/client/import-public/{id}/ [POST]
Request:

{"data":{"id":"3ead5521-2fbc-11e6-834a-f0def1ff5901","pubkey":"LS0tLS1CR .. S0tLQ=="}}

Response:

{"status":"success","id":"3ead5521-2fbc-11e6-834a-f0def1ff5901"}

or

{"status":"error","details":"no data to import"}
  • /eos/msg-api/msg/encrypt/{clientId}/{data}/ [GET]
Response:

{"status":"success","data":{"message":":774c6b663650636 .. 34346616f5901"}}

or

{"status":"error","details":"no client for id"}
  • /eos/msg-api/msg/decrypt/{data}/ [GET]
Request:

/eos/msg-api/msg/decrypt/{"message":":774c6b663650636 .. 34346616f5901"}/

Response:

{"status":"success","data":"foo bar"}

or

{"status":"error","details":"wrong format"}
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
anousss007/vigilance
supportpal/eloquent-model
ardenexal/fhir-models
laravel-at/laravel-image-sanitize
romalytar/yammi-audit-log-laravel
ardenexal/fhir-validation
arshaviras/weather-widget
laravel-chronicle/core
sunchayn/nimbus
daikazu/eloquent-salesforce-objects
unseen-codes/chat
romalytar/yammi-jobs-monitoring-laravel
kisame76/filament-db-table-state
nqxcode/laravel-lucene-search
dpfx/laravel-livewire-wizards
workos/workos-php-laravel
sofa/laravel-global-scope
nawasara/auth-primitives
adhocrat-io/arkhe-main
make-dev/orca-harpoon