Skip to content

Instantly share code, notes, and snippets.

View mrsimonbennett's full-sized avatar
👋

Simon Bennett mrsimonbennett

👋
View GitHub Profile
<?php namespace KBC\Accounts;
use KBC\Accounts\Events\AccountWasDeleted;
use KBC\Accounts\Events\AccountWasOpened;
use KBC\Accounts\Events\MoneyWasWithdrawn;
use KBC\Accounts\Events\MoneyWasDeposited;
use KBC\Core\BaseModel;
final class Account extends BaseModel
{
@mrsimonbennett
mrsimonbennett / openssl_encrypt_decrypt.php
Created July 16, 2019 10:45 — forked from joashp/openssl_encrypt_decrypt.php
Simple PHP encrypt and decrypt using OpenSSL
<?php
/**
* simple method to encrypt or decrypt a plain text string
* initialization vector(IV) has to be the same when encrypting and decrypting
*
* @param string $action: can be 'encrypt' or 'decrypt'
* @param string $string: string to encrypt or decrypt
*
* @return string
*/