Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Google Maps Static API V2 Cryptographic Signing Process

I have been trying to use Google Maps Static API Version 2 to work and sign the URL using Google's recommended process (HMAC-SHA1 created by the National Security Agency), (See Google's instructions: http://code.google.com/apis/maps/documentation/webservices/#URLSigning)

There are many examples on the google site, Python, Java, C#, PHP, VBNet, others.. All of which require loading security code libraries. For example, the VB.Net example uses MSCOLIB.DLL. But I have found no security libraries (or a way to include libraries) to use inside QlikView.

When using a valid Google Maps API Premier license, we are given a Base64 encrypted key. The process of signing the map URL involves, at a high level:

1. Constructing the valid URL, stripping off "http:/".

2. In the encrypted key, replace "-" with "+" and replace "_" with "/", then decompose to binary using Base64.

3. Use the HMAC-SHA1 algorithm (passing it the stripped URL and the binary encrypted key) to create a new binary crypto-key then convert the new binary crypto-key back to Base64. This involves padding the key and URL with zeros, doing an XOR bit by bit, then using the result to create a new binary pattern for the new binary crypto-key.

4. In the new Base64 crypto-key, replace "+" with "-" and replace "/" with "_".

5. Append "&Signature=" and the new Base64 crypto-key to the URL. Put "http:/" back on the front of the URL.

6. Now you are ready to use Google Maps API V2 in QlikView. (Whew!)

So the question is: Has anyone successfully done this? I am not convinced the Google Maps API V2 can be used legally within QlikView

A few other links for reference:

http://code.google.com/apis/maps/documentation/webservices/#URLSigning

http://en.wikipedia.org/wiki/Base64

http://www.ietf.org/rfc/rfc2104.txt

http://en.wikipedia.org/wiki/HMAC

http://en.wikipedia.org/wiki/SHA-1

I'll give a wheat penny and a buffalo nickle to anyone who can help with this!

Tom Weaver

2 Replies
Not applicable
Author

As an alternative, does anyone know how to invoke an external script, passing it our key and url to be encrypted?

Not applicable
Author

I'm also looking for the answer for this topic.
I can't figure out how to generate the signature key inside Qlikview for the Google Map.

I have logged a case with Google, they said they do not support 3rd party software and have no knowledge on QlikView, and suggested me to ask QlikView to look into this. They said is just a HMAC-SHA1, which is a standard algorithm to generate message hash. I should consult QlikView team to calculate it on QlikView.