Skip to content

Commit

Permalink
Remove cipherParams instanceof check
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonWoolf committed Sep 8, 2015
1 parent 08438ef commit 72fcc4a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
5 changes: 1 addition & 4 deletions browser/lib/util/crypto.js
Original file line number Diff line number Diff line change
Expand Up @@ -159,10 +159,7 @@ var Crypto = (function() {
Crypto.getCipher = function(channelOpts, callback) {
var params = channelOpts && channelOpts.cipherParams;
if(params) {
if(params instanceof CipherParams)
callback(null, new CBCCipher(params));
else
callback(new Error("ChannelOptions not supported"));
callback(null, new CBCCipher(params));
return;
}
Crypto.getDefaultParams(function(err, params) {
Expand Down
5 changes: 1 addition & 4 deletions nodejs/lib/util/crypto.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,10 +134,7 @@ var Crypto = (function() {
Crypto.getCipher = function(channelOpts, callback) {
var params = channelOpts && channelOpts.cipherParams;
if(params) {
if(params instanceof CipherParams)
callback(null, new CBCCipher(params));
else
callback(new Error("ChannelOptions not supported"));
callback(null, new CBCCipher(params));
return;
}
Crypto.getDefaultParams(function(err, params) {
Expand Down

0 comments on commit 72fcc4a

Please sign in to comment.