Skip to content

Instantly share code, notes, and snippets.

View syardumi's full-sized avatar

Steve Yardumian syardumi

View GitHub Profile
const cryptoRandomString = require('crypto-random-string')
const ses = new (require('aws-sdk').SES)()
const sendEmail = async (emailAddress, secretLoginCode) => {
const params = {
Destination: { ToAddresses: [emailAddress] },
Message: {
Body: {
Html: {
@syardumi
syardumi / DigSig.ts
Created February 21, 2024 22:05
Digital Signature Package
import jwa from 'jwa'
import AWS from 'aws-sdk'
import { v4 as uuidv4 } from 'uuid'
import { parse as parseQuery } from 'querystring'
const ecdsa = jwa('ES256')
interface KeyStore {
public: Record<string, string>
private: Record<string, string>