@@ -58,32 +58,32 @@ function ondone(err, key) {
5858// Error path should not leak memory (check with valgrind).
5959assert . throws ( function ( ) {
6060 crypto . pbkdf2 ( 'password' , 'salt' , 1 , 20 , null ) ;
61- } , / N o c a l l b a c k / ) ;
61+ } , / ^ E r r o r : N o c a l l b a c k p r o v i d e d t o p b k d f 2 $ / ) ;
6262
6363// Should not work with Infinity key length
6464assert . throws ( function ( ) {
6565 crypto . pbkdf2 ( 'password' , 'salt' , 1 , Infinity , 'sha256' , common . fail ) ;
66- } , / B a d k e y l e n g t h / ) ;
66+ } , / ^ T y p e E r r o r : B a d k e y l e n g t h $ / ) ;
6767
6868// Should not work with negative Infinity key length
6969assert . throws ( function ( ) {
7070 crypto . pbkdf2 ( 'password' , 'salt' , 1 , - Infinity , 'sha256' , common . fail ) ;
71- } , / B a d k e y l e n g t h / ) ;
71+ } , / ^ T y p e E r r o r : B a d k e y l e n g t h $ / ) ;
7272
7373// Should not work with NaN key length
7474assert . throws ( function ( ) {
7575 crypto . pbkdf2 ( 'password' , 'salt' , 1 , NaN , 'sha256' , common . fail ) ;
76- } , / B a d k e y l e n g t h / ) ;
76+ } , / ^ T y p e E r r o r : B a d k e y l e n g t h $ / ) ;
7777
7878// Should not work with negative key length
7979assert . throws ( function ( ) {
8080 crypto . pbkdf2 ( 'password' , 'salt' , 1 , - 1 , 'sha256' , common . fail ) ;
81- } , / B a d k e y l e n g t h / ) ;
81+ } , / ^ T y p e E r r o r : B a d k e y l e n g t h $ / ) ;
8282
8383// Should not work with key length that does not fit into 32 signed bits
8484assert . throws ( function ( ) {
8585 crypto . pbkdf2 ( 'password' , 'salt' , 1 , 4073741824 , 'sha256' , common . fail ) ;
86- } , / B a d k e y l e n g t h / ) ;
86+ } , / ^ T y p e E r r o r : B a d k e y l e n g t h $ / ) ;
8787
8888// Should not get FATAL ERROR with empty password and salt
8989// https://github.com/nodejs/node/issues/8571
0 commit comments