Hi all,
I'm trying to run a Java URL signer within Velocity for to handle a signature with on the Google Maps Static API, within a velocity token. In searching the forums I know that Java capabilities have been/are being deprecated in Velocity, but in looking at the Base64 module, I'm curious if it's possible to merge the two together with the libraries listed on the Java URL signer, or if I have to go about it another way.
My thought was to add the Base64 module, #set the static strings, remove the error handling and print/input sections, as Marketo has no problem telling me the code is broken, and there's no need to input since the data would be within the script. That leaves the question of the other imports, specifically the HMAC-SHA1.
Before I start down this path further, I figured I would ask, is this even remotely possible?
Solved! Go to Solution.
It’s not possible (anymore) to load any other classes in Marketo’s Velocity besides the standard Tools (which don’t include Java crypto stuff).
I was able to do that Base64 thing without using any other special classes, but the next level of actual crypto wouldn’t be possible — don’t get me wrong, I’ve thought about taking off time to do SHA-256 in Velocity, but that wouldn’t be a very relaxing month off. 🙂
I’d use FlowBoost if I were you. (Knowing you already use it.)
@michaelstancil , I'll be honest - I couldn't work out what the use case is, or what you're trying to achieve?
Our API configuration requires a signature, and given the URL the signature could be applied to is dynamic, I need to create that signature each time I call the API, as every request is unique based on user parameters.
It’s not possible (anymore) to load any other classes in Marketo’s Velocity besides the standard Tools (which don’t include Java crypto stuff).
I was able to do that Base64 thing without using any other special classes, but the next level of actual crypto wouldn’t be possible — don’t get me wrong, I’ve thought about taking off time to do SHA-256 in Velocity, but that wouldn’t be a very relaxing month off. 🙂
I’d use FlowBoost if I were you. (Knowing you already use it.)
I’d use FlowBoost if I were you. (Knowing you already use it.)
(FBUtil.crypto is a copy of crypto-js.)
I was curious if this was FlowBoost-able, just wasn't sure with the cross-language component - I'll start digging!