Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

java script encodeuricomponent equivalent in plsql

Vamshi Krishna DamidiSep 25 2012 — edited Sep 25 2012
All -- I am trying to convert functionality from java script to PLSQL and researching on equivalent functionality for encodeuricomponent

Below is complete code from java script

function generateSignedURL(actionName, form, accessKeyId, secretKey, endpoint, version) {
var url = endpoint + "?SignatureVersion=1&Action=" + actionName + "&Version=" + encodeURIComponent(version) + "&";
for (var i = 0; i < form.elements.length; ++i) {
var elementName = form.elements.name;

var elementValue = null;

if (form.elements[i].type == 'text') {
elementValue = form.elements[i].value;
} else if (form.elements[i].type == 'select-one') {
elementValue = form.elements[i].options[form.elements[i].selectedIndex].value;
}
if (elementValue) {
url += elementName;
url += "=";
url += encodeURIComponent(elementValue);
url += "&";
}
}
var timestamp = getNowTimeStamp();
url += "Timestamp=" + encodeURIComponent(timestamp);

url += "&AWSAccessKeyId=" + encodeURIComponent(accessKeyId);
var signature = generateV1Signature(url, secretKey);
url += "&Signature=" + encodeURIComponent(signature);

return url;
}

I am trying to write this in plsql to acheive same functionality.

Any help would be greatly appreciated.

Thanks,
Vamshi .D
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 23 2012
Added on Sep 25 2012
6 comments
1,479 views