Skip to content
Browse files

Formatting only (stick to 80 chars per line)

  • Loading branch information...
1 parent adaa0c7 commit 412b825f6003ce0d77c8c405d81ac85fcbf0c5e8 @thiagoarrais committed Mar 15, 2012
Showing with 7 additions and 3 deletions.
  1. +5 −2 src/node_crypto.cc
  2. +2 −1 test/simple/test-crypto.js
View
7 src/node_crypto.cc
@@ -1999,7 +1999,8 @@ class Cipher : public ObjectWrap {
cipher->incomplete_base64=NULL;
- if (args.Length() <= 1 || !args[0]->IsString() || (!args[1]->IsString() && !Buffer::HasInstance(args[1]))) {
+ if (args.Length() <= 1 || !args[0]->IsString() ||
+ (!args[1]->IsString() && !Buffer::HasInstance(args[1]))) {
return ThrowException(Exception::Error(String::New(
"Must give cipher-type, key")));
}
@@ -2044,7 +2045,9 @@ class Cipher : public ObjectWrap {
cipher->incomplete_base64=NULL;
- if (args.Length() <= 2 || !args[0]->IsString() || (!args[1]->IsString() && !Buffer::HasInstance(args[1])) || (!args[2]->IsString() && !Buffer::HasInstance(args[2]))) {
+ if (args.Length() <= 2 || !args[0]->IsString() ||
+ (!args[1]->IsString() && !Buffer::HasInstance(args[1])) ||
+ (!args[2]->IsString() && !Buffer::HasInstance(args[2]))) {
return ThrowException(Exception::Error(String::New(
"Must give cipher-type, key, and iv as argument")));
}
View
3 test/simple/test-crypto.js
@@ -463,7 +463,8 @@ txt += decipher.final('utf8');
assert.equal(txt, plaintext, 'encryption and decryption with key and iv');
-var encryption_key_buf = new Buffer('303132333435363738396162636430313233343536373839', 'hex'); //0123456789abcd0123456789
+var encryption_key_buf = //0123456789abcd0123456789
+ new Buffer('303132333435363738396162636430313233343536373839', 'hex');
var iv_buf = new Buffer('3132333435363738', 'hex'); //12345678
var cipher = crypto.createCipheriv('des-ede3-cbc', encryption_key_buf, iv_buf);

0 comments on commit 412b825

Please sign in to comment.
Something went wrong with that request. Please try again.