How to use the crypto-ld.RSAKeyPair function in crypto-ld

To help you get started, we’ve selected a few crypto-ld examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github digitalbazaar / jsonld-signatures / tests / mock / RsaSignature2018.js View on Github external
'DJBMvvFAIC00nSGB6Tn0XKbbF9XrsaJZREWvR2aONYTQQxnyXirtXnlewJMB' +
      'Bn2h9hfcGZrvnC1b6PgWmukzFJ1IiH1dWgnDIS81BH-IxXnPkbuYDeySorc4' +
      'QU9MJxdVkY5EL4HYbcIfwKj6X4LBQ2_ZHZIu1jdqLcRZqHcsDF5KKylKc1TH' +
      'n5VRWy5WhYg_gBnyWny8E6Qkrze53MR7OuAmmNJ1m1nN8SxDrG6a08L78J0-' +
      'Fbas5OjAQz3c17GY8mVuDPOBIOVjMEghBlgl3nOi1ysxbRGhHLEK4s0KKbeR' +
      'ogZdgt1DkQxDFxxn41QWDw_mmMCjs9qxg0zcZzqEJw',
    'proofPurpose': NOOP_PROOF_PURPOSE_URI
  }
};

mock.parameters = {};

mock.parameters.sign = {
  creator: publicKeys.alice.id,
  date: '2018-02-22T15:16:04Z',
  key: new RSAKeyPair({
    privateKeyPem: privateKeys.alice.privateKeyPem,
    ...publicKeys.alice
  })
};

mock.parameters.verify = {
  creator: publicKeys.alice.id,
  date: '2018-02-22T15:16:04Z'
};

mock.parameters.verifyWithPassedKey = mock.parameters.sign;

mock.parameters.authenticationController = {
  '@context': constants.SECURITY_CONTEXT_URL,
  id: controllers.alice.id,
  authentication: publicKeys.alice.id

crypto-ld

A Javascript library for generating and performing common operations on Linked Data cryptographic key pairs.

BSD-3-Clause
Latest version published 2 years ago

Package Health Score

51 / 100
Full package analysis