danieljoos/aws-sign-web

how to include this lib

Opened this issue · 1 comments

Hi,
I am new to browser world so excuse if this sounds naive. I am trying to use this lib on browser side to generate AWS sigV4, stumbled at first block.

I have include the files in html as -

<script src="./crypto-js/index.js"></script>
<script src="./crypto-js/sha256.js"></script>
<script src="./crypto-js/hmac-sha256.js"></script>
<script src="./aws-sign-web/aws-sign-web.js"></script>

This throws multiple errors such as -

sha256.js:19 Uncaught TypeError: Cannot read property 'lib' of undefined
at sha256.js:19
at sha256.js:194
at sha256.js:12
at sha256.js:14

hmac-sha256.js:16 Uncaught TypeError: Cannot read property 'HmacSHA256' of undefined
at hmac-sha256.js:16
at hmac-sha256.js:12
at hmac-sha256.js:14

aws-sign-web.js:19 Uncaught TypeError: Cannot read property 'SHA256' of undefined
at aws-sign-web.js:19
at aws-sign-web.js:21

No clue as to how to solve this. Please help

Had to add crypto-js.js. That did it. Thanks.