lib/security.js
function containsEncryptedData(obj) {
    var foundEncrypted = false;
    if (_.isString(obj)) {
        foundEncrypted = isEncrypted(obj);
    } else if (_.isArray(obj)) {
        for (var i = 0; i < obj.length; i++) {
            foundEncrypted = foundEncrypted || containsEncryptedData(obj[i]);
        }
    } else if (_.isObject(obj)) {
        for (var key in obj) {
            foundEncrypted = foundEncrypted || containsEncryptedData(obj[key]);
        }
    }

    return foundEncrypted;
}
function containsEncryptedData(obj) {
    var foundEncrypted = false;
    if (_.isString(obj)) {
        foundEncrypted = isEncrypted(obj);
    } else if (_.isArray(obj)) {
        for (var i = 0; i < obj.length; i++) {
            foundEncrypted = foundEncrypted || containsEncryptedData(obj[i]);
        }
    } else if (_.isObject(obj)) {
        for (var key in obj) {
            foundEncrypted = foundEncrypted || containsEncryptedData(obj[key]);
        }
    }

    return foundEncrypted;
}
function containsEncryptedData ( obj ) { var foundEncrypted = false ; if ( _ . isString ( obj ) ) { foundEncrypted = isEncrypted ( obj ) ; } else if ( _ . isArray ( obj ) ) { for ( var i = 0 ; i < obj . length ; i ++ ) { foundEncrypted = foundEncrypted || containsEncryptedData ( obj [ i ] ) ; } } else if ( _ . isObject ( obj ) ) { for ( var key in obj ) { foundEncrypted = foundEncrypted || containsEncryptedData ( obj [ key ] ) ; } } return foundEncrypted ; }
Recurse through the provided json object, looking for strings that are encrypted
@param obj
@returns {*}
Recurse through the provided json object looking for strings that are encrypted