Back to packages list

Vals using tweetnacl

Description from the NPM package:
Port of TweetNaCl cryptographic library to JavaScript
artivilla avatar
artivilla
slothdaobot
HTTP
SlothDAObot Allow your discord guild to run the following actions in their own channels: /links --2 to print a list of links in the last 2 weeks /summary --2 to print a summary of all the content shared in the last 2 weeks How to deploy Create a new discord bot new appplication: https://discord.com/developers/applications Under applications > OAuth2 , header OAuth2 URL Generator , select Bot Under Bot Permissions , select all options that are relevant (see example for this bot below) Copy Generated URL from the bottom of the page and open and install for your guild/community. Note, the permissions are not saved on the page upon refreashing the page.
0
easrng avatar
easrng
encryption
Script
good for session cookies or whatevs
0
tmcw avatar
tmcw
tweetnacl
Script
tweetnacl example An example of using tweetnacl from Val Town - this uses the keyPair method and then encodes the keypair using hex encoding.
0
demo avatar
demo
naclValidateRequest
Script
An interactive, runnable TypeScript val by demo
0
demo avatar
demo
naclValidate
Script
An interactive, runnable TypeScript val by demo
0
easrng avatar
easrng
valSignVerify
Script
see @easrng.valSign for documentation.
0
easrng avatar
easrng
valSign
Script
secure signatures with vals setup you'll need to make 2 new vals: generate a keypair (keep this val private) let vsExportedKeys = @easrng.generateKeys(); publish your public key (make this val public) const vsPublicKey = () => @me.exportedKeys.publicKey; usage sign call @easrng.valSign to get a signature. const signature = await @easrng.valSign({ keys: @me.vsExportedKeys, data: {hello: "world"}}) the result will look something like this: @easrng.htVgaVWWtvnz5AK0DnDaNON5gar5qJeaorfsTCiIr7ua_-D4HPmFrIrPMfwmCaMvI0CxKlYCUe9XTGm7r5s5C3siZGF0YSI6eyJoZWxsbyI6IndvcmxkIn0sInVzZXIiOiJlYXNybmciLCJleHByIjpudWxsfQ you can also set an expiration date: const signature = await @easrng.valSign({ keys: @me.vsExportedKeys, data: "this expires in 1 second", expireIn: 1000 }) verify call @easrng.valSignVerify to verify a signature const { data, handle, expiresAt } = await @easrng.valSignVerify(signature) with the example signature from earlier, data would be {hello: "world"} , handle would be easrng , and expiresAt would be null
2
easrng avatar
easrng
generateKeys
Script
An interactive, runnable TypeScript val by easrng
0
1
Next