keypair.js 673 B

12345678910111213141516171819202122
  1. /*
  2. * Copyright 2018 Scytl Secure Electronic Voting SA
  3. *
  4. * All rights reserved
  5. *
  6. * See our extended copyright notice in *file 'Copyright.txt' which is part of this source code package
  7. */
  8. /* jshint node:true */
  9. 'use strict';
  10. module.exports = KeyPair;
  11. /**
  12. * @class KeyPair
  13. * @classdesc Encapsulates a key pair. To instantiate this object, use the
  14. * method {@link AsymmetricCryptographyService.newKeyPair}.
  15. * @property {string} publicKey The public key, in PEM format.
  16. * @property {string} privateKey The private key, in PEM format.
  17. */
  18. function KeyPair(publicKey, privateKey) {
  19. return Object.freeze({publicKey: publicKey, privateKey: privateKey});
  20. }