Skip to content

Instantly share code, notes, and snippets.

View Aissaoui-Ahmed's full-sized avatar
🏠
Working from home

Aissaoui Ahmed Aissaoui-Ahmed

🏠
Working from home
View GitHub Profile
@fatehMohamed14
fatehMohamed14 / Elastic Security Alert Typescript Interfaces
Created May 28, 2023 08:43
ES Alert Typescript types and interfaces that you may need when integrating alerts in your Typescript based web applications
export interface Alert {
id?: string
agent?: AlertAgent
process?: Process
rule?: Rule
message?: string
'@timestamp'?: string
file?: File
Endpoint?: Endpoint
ecs?: Ecs
@siwalikm
siwalikm / aes-256-cbc.js
Last active July 23, 2024 02:26
AES-256-CBC implementation in nodeJS with built-in Crypto library
'use strict';
const crypto = require('crypto');
const ENC_KEY = "bf3c199c2470cb477d907b1e0917c17b"; // set random encryption key
const IV = "5183666c72eec9e4"; // set random initialisation vector
// ENC_KEY and IV can be generated as crypto.randomBytes(32).toString('hex');
const phrase = "who let the dogs out";
var encrypt = ((val) => {