This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
window.onload = function () { | |
var myCanvas = document.getElementById("myCanvas"); | |
var ctx = myCanvas.getContext("2d"); | |
// Fill Window Width and Height | |
myCanvas.width = window.innerWidth; | |
myCanvas.height = window.innerHeight; | |
// Set Background Color | |
ctx.fillStyle = "#292a2d"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function WebCrypto() { | |
const buffToBase64 = (buff) => btoa(String.fromCharCode.apply(null, buff)); | |
const base64ToBuff = (b64) => | |
Uint8Array.from(atob(b64), (c) => c.charCodeAt(null)); | |
const enc = new TextEncoder(); | |
const dec = new TextDecoder(); | |
const bytes = { salt: 16, iv: 12 }; | |
/** |