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×tamp=1315060510"
- 3. String to create SHA1 HEX digest for:
- "public_id=sample×tamp=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?