File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -57,23 +57,23 @@ JsSIP.DigestAuthentication.prototype.authenticate = function(password) {
5757 }
5858
5959 // HA1 = MD5(A1) = MD5(username:realm:password)
60- ha1 = JsSIP . Utils . MD5 ( this . username + ":" + this . realm + ":" + password ) ;
60+ ha1 = JsSIP . Utils . calculateMD5 ( this . username + ":" + this . realm + ":" + password ) ;
6161
6262 if ( this . qop === 'auth' || this . qop === null ) {
6363 // HA2 = MD5(A2) = MD5(method:digestURI)
64- ha2 = JsSIP . Utils . MD5 ( this . method + ":" + this . uri ) ;
64+ ha2 = JsSIP . Utils . calculateMD5 ( this . method + ":" + this . uri ) ;
6565
6666 } else if ( this . qop === 'auth-int' ) {
6767 // HA2 = MD5(A2) = MD5(method:digestURI:MD5(entityBody))
68- ha2 = JsSIP . Utils . MD5 ( this . method + ":" + this . uri + ":" + JsSIP . Utils . MD5 ( this . body ? this . body : "" ) ) ;
68+ ha2 = JsSIP . Utils . calculateMD5 ( this . method + ":" + this . uri + ":" + JsSIP . Utils . calculateMD5 ( this . body ? this . body : "" ) ) ;
6969 }
7070
7171 if ( this . qop === 'auth' || this . qop === 'auth-int' ) {
7272 // response = MD5(HA1:nonce:nonceCount:credentialsNonce:qop:HA2)
73- this . response = JsSIP . Utils . MD5 ( ha1 + ":" + this . nonce + ":" + this . decimalToHex ( this . nc ) + ":" + this . cnonce + ":" + this . qop + ":" + ha2 ) ;
73+ this . response = JsSIP . Utils . calculateMD5 ( ha1 + ":" + this . nonce + ":" + this . decimalToHex ( this . nc ) + ":" + this . cnonce + ":" + this . qop + ":" + ha2 ) ;
7474 } else {
7575 // response = MD5(HA1:nonce:HA2)
76- this . response = JsSIP . Utils . MD5 ( ha1 + ":" + this . nonce + ":" + ha2 ) ;
76+ this . response = JsSIP . Utils . calculateMD5 ( ha1 + ":" + this . nonce + ":" + ha2 ) ;
7777 }
7878
7979 return this . toString ( ) ;
Original file line number Diff line number Diff line change @@ -185,7 +185,7 @@ JsSIP.Utils= {
185185 } ,
186186
187187 // MD5 (Message-Digest Algorithm) http://www.webtoolkit.info
188- MD5 : function ( string ) {
188+ calculateMD5 : function ( string ) {
189189 function RotateLeft ( lValue , iShiftBits ) {
190190 return ( lValue << iShiftBits ) | ( lValue >>> ( 32 - iShiftBits ) ) ;
191191 }
You can’t perform that action at this time.
0 commit comments