How to use the createCredentials function from crypto
Find comprehensive JavaScript crypto.createCredentials code examples handpicked from public code repositorys.
GitHub: nujs/nu
188 189 190 191 192 193 194 195 196 197
var self = this; var options = this._tlsOptions; // Wrap socket's handle var credentials = options.credentials || crypto.createCredentials(); this.ssl = tls_wrap.wrap(this._handle, credentials.context, options.isServer); this.server = options.server || null; // For clients, we will always have either a given ca list or be using
1
9
6
GitHub: Hsinkai2000/Bahoot
327 328 329 330 331 332 333 334 335 336
// _socket <-> _protocol // after: // _socket <-> securePair.encrypted <-> securePair.cleartext <-> _protocol var connection = this; var credentials = Crypto.createCredentials({ ca : this.config.ssl.ca, cert : this.config.ssl.cert, ciphers : this.config.ssl.ciphers, key : this.config.ssl.key,
0
1
1
GitHub: theosp/node
44 45 46 47 48 49 50 51 52
this._done = false; var crypto = require('crypto'); if (!credentials) { this.credentials = crypto.createCredentials(); } else { this.credentials = credentials; }
0
1
2
GitHub: songinyong/sage2
115 116 117 118 119 120 121 122 123 124
* @return {Object} secure context */ function secureContext(key, crt, ca) { var ctx; if (_NODE_VERSION === 10) { ctx = crypto.createCredentials({key: key, cert: crt, ca: ca}); } else { // Versions 11 or 1.x or above ctx = tls.createSecureContext({key: key, cert: crt, ca: ca}); }
0
0
0
311 312 313 314 315 316 317 318 319 320
The `key` is the raw key used by the `algorithm` and `iv` is an [initialization vector][]. Both arguments must be `'binary'` encoded strings or [buffers][]. ### crypto.createCredentials(details) Stability: 0 - Deprecated: Use [`tls.createSecureContext`][] instead. The `crypto.createCredentials()` method is a deprecated alias for creating
0
0
1
crypto.createHash is the most popular function in crypto (882 examples)