Skip to content

Instantly share code, notes, and snippets.

@dougvann
dougvann / gist:71cb97450a9ff0a681ae4a09b79d3185
Last active November 24, 2020 18:46
Lando still uses composer 2.0.3
name: citw-3.0
recipe: drupal8
config:
via: apache:2.4
database: mariadb
drush: ^10
drupal: true
xdebug: false
php: '7.4'
webroot: drupal/web
function encryptData($data) {
$plainText = json_encode($data);
$bytesToBeEncrypted = $plainText;
$passwordBytes = utf8_encode("p@SSword");
$passwordBytes = hash('sha256', $passwordBytes, true);
$saltBytes = array(1,2,3,4,5,6,7,8);
$saltBytesstring = "";
using System;
using System.IO;
using System.Security.Cryptography;
using System.Text;
namespace Mhk.Mp.Beneficiary.TokenCodeForClients
{
public class CipherService
{
<?php
function encryptData($data) {
$plainText = json_encode($data);
print '$Plaintext = json_encode($data)' . " \nVAL:$plainText \n \n";
$encryptionKey = 'p@SSword';
print "\$encryptionKey = 'p@SSword' \nVAL:$encryptionKey \n \n";
$bytesToBeEncrypted = utf8_encode($plainText);
<?php
function encryptData($data) {
$plainText = json_encode($data);
print '$Plaintext = json_encode($data)' . " \nVAL:$plainText \n \n";
$encryptionKey = 'p@SSword';
print "\$encryptionKey = 'p@SSword' \nVAL:$encryptionKey \n \n";
$bytesToBeEncrypted = $plainText;