File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55 * @ignore
66 */
77const base64url = require ( 'base64url' )
8- let crypto = require ( 'isomorphic-webcrypto ' )
8+ let crypto = require ( '../crypto ' )
99const TextEncoder = require ( '../text-encoder' )
1010
11- // FIXME:
12- if ( ! crypto . subtle && ! ! crypto . default ) {
13- crypto = crypto . default
14- }
15-
1611/**
1712 * RSASSA-PKCS1-v1_5
1813 */
Original file line number Diff line number Diff line change 1+ const imported = require ( 'isomorphic-webcrypto' )
2+
3+ module . exports = ( imported . default ? imported . default : imported )
Original file line number Diff line number Diff line change 11/**
22 * @module JSON Object Signing and Encryption (JOSE)
33 */
4+ const crypto = require ( './crypto' )
45const JWA = require ( './jose/JWA' )
56const JWK = require ( './jose/JWK' )
67const JWKSet = require ( './jose/JWKSet' )
@@ -11,6 +12,7 @@ const JWS = require('./jose/JWS')
1112 * Export
1213 */
1314module . exports = {
15+ crypto,
1416 JWA ,
1517 JWK ,
1618 JWKSet,
Original file line number Diff line number Diff line change 1+ 'use strict'
2+
3+ /**
4+ * Test dependencies
5+ */
6+ const chai = require ( 'chai' )
7+ const chaiAsPromised = require ( 'chai-as-promised' )
8+
9+ /**
10+ * Assertions
11+ */
12+ chai . should ( )
13+ chai . use ( chaiAsPromised )
14+ let expect = chai . expect
15+
16+ /**
17+ * Code under test
18+ */
19+ const Index = require ( '../src/' )
20+
21+ /**
22+ * Tests
23+ */
24+ describe ( 'Index' , ( ) => {
25+ it ( 'exports crypto' , ( ) => {
26+ return Object . keys ( Index . crypto ) . should . deep . equal ( [ 'subtle' ] )
27+ } )
28+ } )
You can’t perform that action at this time.
0 commit comments