Example of AES in CBC mode with PKCS7 padding using the tiny-AES implementation of kokke.
Files needed besides the test.c found below
Once you have all the files simply run make
// Dart | |
void _incrementCounter() { | |
String secret = "762c4144-1630-4fab-9161-0fef8b18d316"; | |
List<int> key = utf8.encode(secret); | |
String message = "clientId=android-app&type=action&ts=1550493108338&actions=%5B%7B%22name%22%3A%22setOn%22%2C%22parameters%22%3A%7B%7D%7D%5D"; | |
List<int> messageBytes = utf8.encode(message); | |
Hmac hmac = new Hmac(sha256, key); | |
Digest digest = hmac.convert(messageBytes); |
const prom = require('prom-client'); | |
const pm2 = require('pm2'); | |
let pm2Bus; | |
const REQ_TOPIC = 'get_prom_register'; | |
function pm2exec(cmd, ...args) { | |
return new Promise((resolve, reject) => { | |
pm2[cmd](...args, (err, resp) => (err ? reject(err) : resolve(resp))); |
Files needed besides the test.c found below
Once you have all the files simply run make
#cloud-config | |
# Ubuntu 22.04+ | |
resize_rootfs: false | |
write_files: | |
- content: | | |
path: /etc/growroot-disabled | |
runcmd: | |
- [ sgdisk, -e, /dev/sda ] | |
- [ partprobe ] | |
- [ parted, -s, /dev/sda, mkpart, primary, xfs, "25%", "100%" ] |