Quantcast
Channel: SCN : Discussion List - SAP HANA Developer Center
Viewing all articles
Browse latest Browse all 6412

[HANA XS] error when interpreting javascript

$
0
0

Hi

 

for a prototype purposes I try to use the Crypto JS library of Google https://code.google.com/p/crypto-js/ on HANA XS as server side coding.

 

I get an odd error in the following section on the line in red:

 

        parse : function(latin1Str) {

          // Shortcut

          var latin1StrLength = latin1Str.length;

 

 

          // Convert

          var words = [];

          for (var i = 0; i < latin1StrLength; i++) {

            words[i >>> 2] |= (latin1Str.charCodeAt(i) & 0xff) << (24 - (i % 4) * 8);

          }

 

 

          return new WordArray.init(words, latin1StrLength);

        }

 

 

This coding works on client side but when I try to use it as a server side script on HANA XS I get following error:

 

     ReferenceError: reference to undefined property words[(i >>> 2)] (line 434 position 0 in /taxi/service/auth/taxi/service/auth/authservice.xsjs)

 

I'm a bit confused  by this one - what does this mean and which property is undefined?

 

Best regards

Vasil


Viewing all articles
Browse latest Browse all 6412

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>