UNPKG

boho

Version:

Encryption, authentication, Secure communication

35 lines (32 loc) 1.09 kB
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document</title> </head> <body> <p>this page includes: </p> <h1>1. UMD(IIFE): ../dist/boho.min.js</h1> <p>use global name: Boho </p> <p>Boho has props: sha256, Buffer, RAND , MBP. </p> <h1>2. ES Module: ../dist/boho.js</h1> <script src="../dist/boho.min.js"></script> <script> // console.log( Boho ) console.log('min.js: sha256.hash("hi")', Boho.sha256.hash('hi')) console.log('min.js: Buffer', Boho.Buffer.alloc(33)) console.log('min.js: RAND', Boho.RAND(33)) </script> <script type="module"> import Boho from "../dist/boho.js" // console.log(Boho) console.log('esm: sha256.hash("hi")', Boho.sha256.hash('hi')) console.log('esm: Buffer', Boho.Buffer.alloc(33)) console.log('esm: RAND', Boho.RAND(33)) console.log('esm: MBP', Boho.MBP ) console.log('isSecureContext', isSecureContext) </script> </body> </html>