summaryrefslogtreecommitdiff
path: root/scripting/utils.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scripting/utils.cpp')
-rw-r--r--scripting/utils.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/scripting/utils.cpp b/scripting/utils.cpp
index de41d50c6ef..97eea103bc2 100644
--- a/scripting/utils.cpp
+++ b/scripting/utils.cpp
@@ -25,20 +25,20 @@ namespace mongo {
void installBenchmarkSystem( Scope& scope );
- BSONObj jsmd5( const BSONObj &a ){
+ BSONObj jsmd5( const BSONObj &a ) {
uassert( 10261 , "js md5 needs a string" , a.firstElement().type() == String );
const char * s = a.firstElement().valuestrsafe();
-
+
md5digest d;
md5_state_t st;
md5_init(&st);
md5_append( &st , (const md5_byte_t*)s , strlen( s ) );
md5_finish(&st, d);
-
+
return BSON( "" << digestToString( d ) );
}
-
- BSONObj JSVersion( const BSONObj& args ){
+
+ BSONObj JSVersion( const BSONObj& args ) {
cout << "version: " << versionString << endl;
if ( strstr( versionString , "+" ) )
printGitVersion();
@@ -50,7 +50,7 @@ namespace mongo {
// ---- installer --------
// ---------------------------------
- void installGlobalUtils( Scope& scope ){
+ void installGlobalUtils( Scope& scope ) {
scope.injectNative( "hex_md5" , jsmd5 );
scope.injectNative( "version" , JSVersion );
@@ -58,5 +58,5 @@ namespace mongo {
}
}
-
+