Hi Guys,
Im trying to Implement the below HTML form to s3 upload
http://aws.amazon.com/articles/Ruby/1434
In that guide it says you have to sign each upload with the following script. It gives Java, Ruby and Python versions.
Which would be the easiest to use and how would I go about implementing this in Revo? Not sure how to go about using any of those languages in Modx
import sun.misc.BASE64Encoder;
import javax.crypto.Mac;
import javax.crypto.spec.SecretKeySpec;
String policy = (new BASE64Encoder()).encode(
policy_document.getBytes("UTF-8")).replaceAll("\n","").replaceAll("\r","");
Mac hmac = Mac.getInstance("HmacSHA1");
hmac.init(new SecretKeySpec(
aws_secret_key.getBytes("UTF-8"), "HmacSHA1"));
String signature = (new BASE64Encoder()).encode(
hmac.doFinal(policy.getBytes("UTF-8")))
.replaceAll("\n", "");
Any Guidance appreciated,
Stuart