2
0

key-pair.js 781 B

123456789101112131415161718192021222324
  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 = ElGamalKeyPair;
  11. /**
  12. * @class ElGamalKeyPair
  13. * @classdesc Encapsulates an ElGamal key pair. To instantiate this object, use
  14. * the method {@link ElGamalCryptographyService.newKeyPair}.
  15. * @property {ElGamalPublicKey} publicKey The ElGamal public key comprising the
  16. * key pair.
  17. * @property {ElGamalPrivateKey} privateKey The ElGamal private key comprising
  18. * the key pair.
  19. */
  20. function ElGamalKeyPair(publicKey, privateKey) {
  21. return Object.freeze({publicKey: publicKey, privateKey: privateKey});
  22. }