Skip to content

Instantly share code, notes, and snippets.

View DurandA's full-sized avatar

Arnaud Durand DurandA

View GitHub Profile
@DurandA
DurandA / gitprint.js
Created September 6, 2023 07:29 — forked from beevelop/gitprint.js
Print GitHub markdown files
document.querySelector('#readme').setAttribute('style', 'position: absolute; top: 0; left: 0; right: 0; bottom: 0; z-index: 100; background-color: white')
document.querySelector('body').appendChild(document.querySelector('#readme'))
window.print()
@DurandA
DurandA / aes-ni.c
Last active August 1, 2023 12:35 — forked from acapola/aes-ni.c
AES128 how-to using GCC and Intel AES-NI
#include <stdint.h> //for int8_t
#include <wmmintrin.h> //for intrinsics for AES-NI
//compile using gcc and following arguments: -g;-O0;-Wall;-msse2;-msse;-march=native;-maes
//internal stuff
//macros
#define DO_ENC_BLOCK(m,k) \
do{\
m = _mm_xor_si128 (m, k[ 0]); \