isaacs
d7da20c812
crypto: pbkdf2 throws when no callback provided
12 years ago
isaacs
76b0bdf720
crypto: Add crypto.DEFAULT_ENCODING (defaults to 'buffer')
This is a flag to make it easier for users to upgrade through the
breaking crypto change, and easier for us to switch it back if it's a
problem.
Explicitly set default encoding to 'buffer' in other tests, in case it
ever changes back.
12 years ago
isaacs
bfb9d5bbe6
crypto: Binding only accepts buffers
12 years ago
isaacs
9901b69c8e
crypto: Move encoding logic to JS, default=buffer
crypto: Hash and Hmac default to buffers
crypto: Move Cipher encoding logic to JS
crypto: Move Cipheriv encoding logic to JS
crypto: Move Decipher encoding logic to JS
crypto: Move Decipheriv into JS, default to buffers
crypto: Move Sign class to JS
crypto: Better encoding handling in Hash.update
crypto: Move Verify class to JS
crypto: Move DiffieHellman to JS, default to buffers
crypto: Move DiffieHellmanGroup to JS, default to buffers
Also, create a test for this feature
12 years ago
Ben Noordhuis
82df345fbb
test: add diffie-hellman regression test
Exercises the error path in DiffieHellman::ComputeSecret() in src/node_crypto.cc
12 years ago
Ben Noordhuis
2fbf0612a1
crypto: sort return value of getCiphers/getHashes
12 years ago
Ben Noordhuis
14a6c4efb8
crypto: add crypto.getHashes()
12 years ago
Ben Noordhuis
f53441ab1f
crypto: add crypto.getCiphers()
Returns a list of, unsurprisingly, the available ciphers.
12 years ago
Fedor Indutny
63ff449d87
crypto: bring module into modern age
Introduce 'buffer' encoding, allow returning and giving buffers as
arguments of 'crypto' routines.
Fix #3278
12 years ago
Ben Noordhuis
2a30d328fa
crypto: add sync interface to crypto.pbkdf2()
Fixes #3766 .
13 years ago
Ben Noordhuis
900196e135
crypto: make cipher/decipher accept buffer args
13 years ago
ssuda
fb7348ae06
crypto: add PKCS12/PFX support
Fixes #2845 .
13 years ago
isaacs
0cdf85e28d
Lint all the JavaScripts.
13 years ago
Ben Noordhuis
cc2861ee44
crypto: don't ignore DH init errors
13 years ago
Ben Noordhuis
d70ef199f1
crypto: fix memory leaks in PBKDF2 error path
13 years ago
Ben Noordhuis
f44d0b9044
crypto: throw exception on unknown digest method
Fixes #2227 .
13 years ago
Ben Noordhuis
7defbd27ef
test: add DSA sign/verify crypto tests
13 years ago
Ben Noordhuis
9d3faf4f9a
crypto: add support for RSA public key signing/verification
13 years ago
Ben Noordhuis
3ac5f1106d
crypto: make verify() return true or false, not 1 or 0
It's what the documentation says it should return.
13 years ago
Ben Noordhuis
534e41b474
crypto: make verify() return true or false, not 1 or 0
It's what the documentation says it should return.
13 years ago
Ryan Dahl
850609ea2d
Remove separation of libuv tests
13 years ago
Ben Noordhuis
018e110cd1
test: replace .addListener() calls with .on()
13 years ago
Colton Baker
87286cc737
Fixed a lot of jslint errors.
Fixes #1831
13 years ago
Ryan Dahl
4e1d6fca8e
Mark tests which are broken in libuv
14 years ago
Glen Low
04122ad2d3
crypto: PBKDF2 function from OpenSSL
14 years ago
SAWADA Tadashi
d3a84bea7b
Fix crypto encryption/decryption with Base64.
Fixes #738 .
Fixes #1205 .
14 years ago
Stefan Bühler
db993956d6
Fix crypto hmac to accept binary keys + add test cases from rfc 2202 and 4231
Fixes #324 .
Fixes #1027 .
Instead of converting buffers to strings and back again to char array
directly use the buffer data in hmac_init (same as in hmac_update).
14 years ago
SAWADA Tadashi
e357acc55b
Fix crypto encryption/decryption with Base64.
Fixes #738 .
Fixes #1205 .
14 years ago
Mark Cavage
88552c51ae
Support for signature verification with RSA/DSA public keys
Fixes #1166 .
14 years ago
Håvard Stranden
9f0b1a9bc6
Add Diffie-Hellman support to crypto module
Fixes #573
14 years ago
Ryan Dahl
55048cdf79
Update copyright headers
14 years ago
Felix Geisendörfer
9d4c5a12f4
Crypto update should only accept strings / buffers
I have seen a lot of people trying to pass objects to crypto's update
functions, assuming that it would somehow serialize the object before
hashing.
In reality, the object was converted to '[object Object]' which was
then hashed, without any error message showing.
This patch modifies the DecodeBytes function (used exclusively by
crypto at this point) to complain when receiving anything but a
string or buffer.
Overall this should be a less-suprising, more robust behavior.
14 years ago
Oleg Efimov
0665f0271e
GJSLint all simple tests exclude http-*, url, path
14 years ago
Ryan Dahl
a0159b4b29
Fix global leaks
14 years ago
Micheil Smith
e38eb0c5a4
Soft migration of sys -> util, Removal of deprecated utils module.
14 years ago
Tony Metzidis
debf389490
Catch Exceptions thrown when openssl is disabled
15 years ago
Benjamin Fritsch
0ed3532699
added test for Issue #214
15 years ago
Ryan Dahl
9fd5e3c89c
Update tests to work with module contexts
15 years ago
Blake Mizerany
8c8534046c
fix whitespace errors
15 years ago
Ryan Dahl
ba792ea202
:%s/sys.puts/console.log/g
and there was much rejoicing
15 years ago
Micheil Smith
3f48276bf9
Coding style changes, added tests in for the md5, sha256, etc methods
15 years ago
Ryan Dahl
009b4569b3
Merge Hash.init() function into JS constructor
15 years ago
Ryan Dahl
1a5acd9850
API: readFileSync without encoding argument now returns a Buffer
Correctly load utf8 data; add a test test-fs-read-file-sync.js
15 years ago
Rhys Jones
1a317135c5
Additional OpenSSL tests
15 years ago