2 * Curve 25519-based cryptography collection.
4 * EC Diffie-Hellman (ECDH) based on Curve25519 and digital signatures (EdDSA)
7 * Copyright (c) 2012 Ron Garret
8 * Copyright (c) 2007, 2013, 2014 Michele Bini
9 * Copyright (c) 2014 Mega Limited
10 * under the MIT License.
12 * You should have received a copy of the license along with this program.
14 // See https://github.com/jrburke/almond#exporting-a-public-api
15 (function (root, factory) {
16 if (typeof define === 'function' && define.amd) {
17 // Allow using this built library as an AMD module
18 // in another project. That other project will only
19 // see this AMD call, not the internal modules in
22 } else if (typeof module === 'object' && module.exports) {
23 // Allow using this built library as a CommonJS module
24 module.exports = factory();
26 // Browser globals case. Just assign the
27 // result to a property on the global.
28 root.jodid25519 = factory();
31 if (typeof module === 'object' && module.exports) {
32 // If we're running under CommonJS, our dependencies get confused and
33 // each clobber module.exports which leads to bad behaviour because
34 // almond does asynchronous loading. So just pretend we're in the
35 // browser globals case, and make them write to those values instead.
36 // TODO: ditch requirejs/almond and use browserify or something.
37 var __oldModule = module;
38 var __oldExports = exports;