summaryrefslogtreecommitdiff
path: root/lib/crypto.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/crypto.js')
-rw-r--r--lib/crypto.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/crypto.js b/lib/crypto.js
index c450f1c15f..9cfc09e3c0 100644
--- a/lib/crypto.js
+++ b/lib/crypto.js
@@ -43,7 +43,7 @@ var util = require('util');
// to break them unnecessarily.
function toBuf(str, encoding) {
encoding = encoding || 'binary';
- if (IS_STRING(str)) {
+ if (util.isString(str)) {
if (encoding === 'buffer')
encoding = 'binary';
str = new Buffer(str, encoding);
@@ -100,7 +100,7 @@ exports.createCredentials = function(options, context) {
if (options.ciphers) c.context.setCiphers(options.ciphers);
if (options.ca) {
- if (IS_ARRAY(options.ca)) {
+ if (util.isArray(options.ca)) {
for (var i = 0, len = options.ca.length; i < len; i++) {
c.context.addCACert(options.ca[i]);
}
@@ -112,7 +112,7 @@ exports.createCredentials = function(options, context) {
}
if (options.crl) {
- if (IS_ARRAY(options.crl)) {
+ if (util.isArray(options.crl)) {
for (var i = 0, len = options.crl.length; i < len; i++) {
c.context.addCRL(options.crl[i]);
}
@@ -198,7 +198,7 @@ Hash.prototype._flush = function(callback) {
Hash.prototype.update = function(data, encoding) {
encoding = encoding || exports.DEFAULT_ENCODING;
- if (encoding === 'buffer' && IS_STRING(data))
+ if (encoding === 'buffer' && util.isString(data))
encoding = 'binary';
this._binding.update(data, encoding);
return this;
@@ -539,7 +539,7 @@ DiffieHellman.prototype.setPrivateKey = function(key, encoding) {
exports.pbkdf2 = function(password, salt, iterations, keylen, callback) {
- if (!IS_FUNCTION(callback))
+ if (!util.isFunction(callback))
throw new Error('No callback provided to pbkdf2');
return pbkdf2(password, salt, iterations, keylen, callback);