Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am nibarius on github.
  • I am barsk (https://keybase.io/barsk) on keybase.
  • I have a public key ASBvUVQtE1hLykdsD7ri7ePgl2lwTiDuc44BwGcFsEihAQo

To claim this, I am signing this object:

@nibarius
nibarius / jsencrypt.js
Last active August 18, 2021 19:34
A variant of jsencrypt.js that can (only) be used to sign messages using public key. Can run in an environment without the window and navigator properties.
// This is a modification of jsencrypt.js from https://github.com/travist/jsencrypt
// It has been modified to remove all accesses to window and navigator to be
// able to use it together with Google Apps Scripts where these properties does not
// exist.
//
// The only intended use of this code is to sign messages using a public key. It
// is done like this:
//
// var encrypt = new JSEncrypt();
// encrypt.setPublicKey(publicKey);