Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@depay/js-verify-signature

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@depay/js-verify-signature

JavaScript library to verify RSA PSS SHA256 signatures with a given public key.

  • 3.1.8
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
89
decreased by-51.1%
Maintainers
1
Weekly downloads
 
Created
Source

Installation

Node.js

yarn add @depay/js-verify-signature

or

npm install --save @depay/js-verify-signature

Web

Web does not need to install crypto nor atob dependencies, but it needs to use the js-verify-signature-web package:

yarn add @depay/js-verify-signature-web

or

npm install --save @depay/js-verify-signature-web

Functionality

import { verify } from '@depay/js-verify-signature'

const data = "Sign me!"
const signature = "AVovd+VSNI/6bg4E4eH+VI/neFuLxREKRqjtOFAMafSOTR9m0B96bBJdAxJ8\n8raPMCkg6R80uc48kV5UsaKCTbo4W+KUHlXONS2RPJz2DCO6E8Kq9K3h7GbB\nO2PUWAD/r4zALkp8gFymyte5E/iRq8AEHTjaPtuYltIzfP7TV8sW3nhFxrTG\nBWG4/fIgb1m+KsAYD19dOSpghOvhJC/WbMJOIt4YeiyZDU9I9G+F5dl6so/m\nxm93jkUq2mJnV8vuXjqRn/KrcTFZPxNTQVSTF/oOpVjXMsPLyJqJxS7giq2u\n2Y/4qquDzmiCdqK8woqrBP13cf0+kkeYS9lmJ14fTQ==\n"
const publicKey = "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA7Uao+6ZgMCCJmvTeOZY7\nf33PZrclAygUoVObqMka3GEGZTcHeBMxGAzs2upwjtn7OcMej7EoVGPDnPaNlgdW\nWRYXe/HG5M4yqSJWbPpuEejxVuNd8DWCKn1V0lvlVy/SCdzBaU0RCvuSiW0PoEla\nsAQr5jKr+R8ORnnU7EZlfAeol07T0AHeB1HBRNuRkBZY+KjN3eOmGMP1ClPJfLhK\nDS7pB1/lfZoPEIYdvB0r6EujKrZv88kLZXFb/OVnr/OsVEpriZlKWWWFTNaMnAHp\n330g1dVh0oEHoiz98G/sFHhr4TsQlp+avfpOlaaVNVf+WuFEIohJspj1MSHdmv6L\n3QIDAQAB\n-----END PUBLIC KEY-----\n"

let verified = await verify({ signature, publicKey, data })
// true

Development

Get started

yarn install
yarn test

Keywords

FAQs

Package last updated on 12 Oct 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc