Skip to content

Instantly share code, notes, and snippets.

@patrickatkeylogic
patrickatkeylogic / crypto-pbkdf2-example.js
Created July 22, 2022 15:26 — forked from skeggse/crypto-pbkdf2-example.js
Example of using crypto.pbkdf2 to hash and verify passwords asynchronously, while storing the hash and salt in a single combined buffer along with the original hash settings
var crypto = require('crypto');
// larger numbers mean better security, less
var config = {
// size of the generated hash
hashBytes: 32,
// larger salt means hashed passwords are more resistant to rainbow table, but
// you get diminishing returns pretty fast
saltBytes: 16,
// more iterations means an attacker has to take longer to brute force an
@patrickatkeylogic
patrickatkeylogic / bno.ino
Created May 14, 2021 17:21
Working with multiple BNO055 chips on a single I2C line
#include <Wire.h>
#include <Adafruit_Sensor.h>
#include <Adafruit_BNO055.h>
#include <utility/imumaths.h>
Adafruit_BNO055 bno = Adafruit_BNO055(1, 0x28);
Adafruit_BNO055 bno2 = Adafruit_BNO055(2, 0x28);
void setup()
{