Source code

Revision control

Other Tools

1
/* This Source Code Form is subject to the terms of the Mozilla Public
2
* License, v. 2.0. If a copy of the MPL was not distributed with this
3
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4
5
/**
6
* Common front for various implementations of OSCrypto
7
*/
8
9
"use strict";
10
11
const { AppConstants } = ChromeUtils.import(
13
);
14
const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
15
16
const EXPORTED_SYMBOLS = ["OSCrypto"];
17
18
this.OSCrypto = {};
19
20
if (AppConstants.platform == "win") {
21
Services.scriptloader.loadSubScript(
23
this
24
);
25
} else {
26
throw new Error("OSCrypto.jsm isn't supported on this platform");
27
}