Skip to content

Instantly share code, notes, and snippets.

View Johnsonojo's full-sized avatar
🏠
Working from home

Johnson Ojo Johnsonojo

🏠
Working from home
View GitHub Profile
@Johnsonojo
Johnsonojo / AesUtil.ts
Created April 25, 2024 08:10 — forked from btxtiger/AesUtil.ts
Node.js - AES Encryption/Decryption with AES-256-GCM using random Initialization Vector + Salt
/**
* Cryptography Functions
*
* Forked from AndiDittrich/AesUtil.js
* https://gist.github.com/AndiDittrich/4629e7db04819244e843
*/
import crypto, { CipherGCM, CipherGCMTypes, DecipherGCM } from 'crypto';
import { Password } from './types';
@Johnsonojo
Johnsonojo / DELETE article endpoint
Last active November 22, 2018 21:52
Tests for delete a articles endpoint
import chaiHttp from 'chai-http';
import chai from 'chai';
import app from '../app';
let userToken;
const userSignin = '/api/v1/auth/login';
const user = {
email: '[email protected]',
password: 'WhyDoYouCare?',
};