Skip to Main Content

APEX

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!

Create a HEX digest string of a SHA1 signature

Scott PendergastOct 17 2015 — edited Oct 18 2015

I need to create a HEX digest string of a SHA1 signature based on a string of concatenated serialized parameters and a secret key.

For example, if the secret is 'abcd', I need to get a Unix timestamp (e.g. 1315060076) and upload a BLOB with a public ID 'sample':

  • 1. Parameters:
    • timestamp: 1315060510
    • public_id: "sample"
    • file: [BLOB]

  • 2. Serialized sorted parameters:
    • "public_id=sample&timestamp=1315060510"

  • 3. String to create SHA1 HEX digest for:
    • "public_id=sample&timestamp=1315060510abcd"

  • SHA1 HEX digest:
    • "c3470533147774275dd37996cc4d0e68fd03cd4f"

  • Final request parameters:
    • timestamp: 1315060510
    • public_id: "sample"
    • file: DATA
    • signature: "c3470533147774275dd37996cc4d0e68fd03cd4f"

How would I do this using pl/sql?

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 15 2015
Added on Oct 17 2015
1 comment
717 views