Re: [WebDNA] HMAC-SHA1 Encryption

This WebDNA talk-list message is from

2013


It keeps the original formatting.
numero = 110298
interpreted = N
texte = SOLVED The secret was to tag the seed value as -binary and then to base64 = encrypt the result. echo -n "apple" | openssl dgst -sha1 -hmac "orange" -binary | openssl = enc -base64 This creates a signature for Amazon S3 On 31/03/2013, at 6:46 PM, Stuart Tremain wrote: > There is something about base64 in the correct result, I just cant = figure out the correct method. >=20 > I added >=20 > | openssl -base64=20 >=20 > to the end but the result is too long. >=20 >=20 >=20 >=20 > On 31/03/2013, at 6:42 PM, christophe.billiottet@webdna.us wrote: >=20 >> In this case, WebDNA transfers the string to openssl. It does not = interfere with the result. It seems to me your result is correct as sha1 = produces a combination of lower case text and numbers. I suppose you can = find the proper openssl string (or php string as it is easy to guess the = openssl variant) on the internet. >>=20 >> - chris >>=20 >>=20 >>=20 >>=20 >>=20 >>=20 >>=20 >> On Mar 31, 2013, at 10:17, Stuart Tremain wrote: >>=20 >>> Chris >>>=20 >>> I tried some experiments, based on some google research. >>>=20 >>> echo -n "AmazonS3ListAllMyBuckets2013-03-31T06:48:36.000Z" | openssl = dgst -sha1 -hmac "fexz1rt1sV3SXRGHAGu6w2vXC7z/kEgfRD3TdSI/" >>>=20 >>> Result is: >>> (stdin)=3D 23e79d1a4f1eded66934c45dd1c3a0677df22cf5 >>> but it is incorrect. >>>=20 >>> This is the correct result: >>> I+edGk8e3tZpNMRd0cOgZ33yLPU=3D >>>=20 >>> Which I got from here: >>>=20 >>> http://hash.online-convert.com/sha1-generator >>>=20 >>> I can't work out how to get the shorter result with the =3D on the = end >>>=20 >>> Stuart >>>=20 >>>=20 >>>=20 >>> On 31/03/2013, at 5:40 PM, christophe.billiottet@webdna.us wrote: >>>=20 >>>> Hi Stuart! try [shell]echo -n 'myString' | openssl sha1[/shell] >>>>=20 >>>> - chris >>>>=20 >>>>=20 >>>> On Mar 31, 2013, at 9:11, Stuart Tremain = wrote: >>>>=20 >>>>> On a Ubuntu 12.04 server if it makes a difference. >>>>>=20 >>>>>=20 >>>>> On 31/03/2013, at 5:05 PM, Stuart Tremain = wrote: >>>>>=20 >>>>>> For Amazon I need to create a signature which is HMAC-SHA1 = encryption with a seed of a test string. >>>>>>=20 >>>>>> How can I do this with WebDNA ? >>>>>>=20 >>>>>>=20 >>>>>>=20 >>>>>> Regards >>>>>>=20 >>>>>> Stuart Tremain >>>>>> IDFK Web Developments >>>>>> AUSTRALIA >>>>>> webdna@idfk.com.au >>>>>>=20 >>>>>>=20 >>>>>>=20 >>>>>>=20 >>>>>> --------------------------------------------------------- >>>>>> This message is sent to you because you are subscribed to >>>>>> the mailing list . >>>>>> To unsubscribe, E-mail to: >>>>>> archives: http://mail.webdna.us/list/talk@webdna.us >>>>>> Bug Reporting: support@webdna.us >>>>>=20 >>>>> --------------------------------------------------------- >>>>> This message is sent to you because you are subscribed to >>>>> the mailing list . >>>>> To unsubscribe, E-mail to: >>>>> archives: http://mail.webdna.us/list/talk@webdna.us >>>>> Bug Reporting: support@webdna.us >>>>=20 >>>> --------------------------------------------------------- >>>> This message is sent to you because you are subscribed to >>>> the mailing list . >>>> To unsubscribe, E-mail to: >>>> archives: http://mail.webdna.us/list/talk@webdna.us >>>> Bug Reporting: support@webdna.us >>>=20 >>> --------------------------------------------------------- This = message is sent to you because you are subscribed to the mailing list . = To unsubscribe, E-mail to: archives: = http://mail.webdna.us/list/talk@webdna.us Bug Reporting: = support@webdna.us >>=20 >> --------------------------------------------------------- >> This message is sent to you because you are subscribed to >> the mailing list . >> To unsubscribe, E-mail to: >> archives: http://mail.webdna.us/list/talk@webdna.us >> Bug Reporting: support@webdna.us >=20 > --------------------------------------------------------- > This message is sent to you because you are subscribed to > the mailing list . > To unsubscribe, E-mail to: > archives: http://mail.webdna.us/list/talk@webdna.us > Bug Reporting: support@webdna.us Associated Messages, from the most recent to the oldest:

    
  1. Re: [WebDNA] HMAC-SHA1 Encryption (Tom Duke 2013)
  2. Re: [WebDNA] HMAC-SHA1 Encryption (Donovan Brooke 2013)
  3. Re: [WebDNA] HMAC-SHA1 Encryption (Tom Duke 2013)
  4. Re: [WebDNA] HMAC-SHA1 Encryption (Stuart Tremain 2013)
  5. Re: [WebDNA] HMAC-SHA1 Encryption (Stuart Tremain 2013)
  6. Re: [WebDNA] HMAC-SHA1 Encryption (christophe.billiottet@webdna.us 2013)
  7. Re: [WebDNA] HMAC-SHA1 Encryption (Stuart Tremain 2013)
  8. Re: [WebDNA] HMAC-SHA1 Encryption (christophe.billiottet@webdna.us 2013)
  9. Re: [WebDNA] HMAC-SHA1 Encryption (Stuart Tremain 2013)
  10. [WebDNA] HMAC-SHA1 Encryption (Stuart Tremain 2013)
SOLVED The secret was to tag the seed value as -binary and then to base64 = encrypt the result. echo -n "apple" | openssl dgst -sha1 -hmac "orange" -binary | openssl = enc -base64 This creates a signature for Amazon S3 On 31/03/2013, at 6:46 PM, Stuart Tremain wrote: > There is something about base64 in the correct result, I just cant = figure out the correct method. >=20 > I added >=20 > | openssl -base64=20 >=20 > to the end but the result is too long. >=20 >=20 >=20 >=20 > On 31/03/2013, at 6:42 PM, christophe.billiottet@webdna.us wrote: >=20 >> In this case, WebDNA transfers the string to openssl. It does not = interfere with the result. It seems to me your result is correct as sha1 = produces a combination of lower case text and numbers. I suppose you can = find the proper openssl string (or php string as it is easy to guess the = openssl variant) on the internet. >>=20 >> - chris >>=20 >>=20 >>=20 >>=20 >>=20 >>=20 >>=20 >> On Mar 31, 2013, at 10:17, Stuart Tremain wrote: >>=20 >>> Chris >>>=20 >>> I tried some experiments, based on some google research. >>>=20 >>> echo -n "AmazonS3ListAllMyBuckets2013-03-31T06:48:36.000Z" | openssl = dgst -sha1 -hmac "fexz1rt1sV3SXRGHAGu6w2vXC7z/kEgfRD3TdSI/" >>>=20 >>> Result is: >>> (stdin)=3D 23e79d1a4f1eded66934c45dd1c3a0677df22cf5 >>> but it is incorrect. >>>=20 >>> This is the correct result: >>> I+edGk8e3tZpNMRd0cOgZ33yLPU=3D >>>=20 >>> Which I got from here: >>>=20 >>> http://hash.online-convert.com/sha1-generator >>>=20 >>> I can't work out how to get the shorter result with the =3D on the = end >>>=20 >>> Stuart >>>=20 >>>=20 >>>=20 >>> On 31/03/2013, at 5:40 PM, christophe.billiottet@webdna.us wrote: >>>=20 >>>> Hi Stuart! try [shell]echo -n 'myString' | openssl sha1[/shell] >>>>=20 >>>> - chris >>>>=20 >>>>=20 >>>> On Mar 31, 2013, at 9:11, Stuart Tremain = wrote: >>>>=20 >>>>> On a Ubuntu 12.04 server if it makes a difference. >>>>>=20 >>>>>=20 >>>>> On 31/03/2013, at 5:05 PM, Stuart Tremain = wrote: >>>>>=20 >>>>>> For Amazon I need to create a signature which is HMAC-SHA1 = encryption with a seed of a test string. >>>>>>=20 >>>>>> How can I do this with WebDNA ? >>>>>>=20 >>>>>>=20 >>>>>>=20 >>>>>> Regards >>>>>>=20 >>>>>> Stuart Tremain >>>>>> IDFK Web Developments >>>>>> AUSTRALIA >>>>>> webdna@idfk.com.au >>>>>>=20 >>>>>>=20 >>>>>>=20 >>>>>>=20 >>>>>> --------------------------------------------------------- >>>>>> This message is sent to you because you are subscribed to >>>>>> the mailing list . >>>>>> To unsubscribe, E-mail to: >>>>>> archives: http://mail.webdna.us/list/talk@webdna.us >>>>>> Bug Reporting: support@webdna.us >>>>>=20 >>>>> --------------------------------------------------------- >>>>> This message is sent to you because you are subscribed to >>>>> the mailing list . >>>>> To unsubscribe, E-mail to: >>>>> archives: http://mail.webdna.us/list/talk@webdna.us >>>>> Bug Reporting: support@webdna.us >>>>=20 >>>> --------------------------------------------------------- >>>> This message is sent to you because you are subscribed to >>>> the mailing list . >>>> To unsubscribe, E-mail to: >>>> archives: http://mail.webdna.us/list/talk@webdna.us >>>> Bug Reporting: support@webdna.us >>>=20 >>> --------------------------------------------------------- This = message is sent to you because you are subscribed to the mailing list . = To unsubscribe, E-mail to: archives: = http://mail.webdna.us/list/talk@webdna.us Bug Reporting: = support@webdna.us >>=20 >> --------------------------------------------------------- >> This message is sent to you because you are subscribed to >> the mailing list . >> To unsubscribe, E-mail to: >> archives: http://mail.webdna.us/list/talk@webdna.us >> Bug Reporting: support@webdna.us >=20 > --------------------------------------------------------- > This message is sent to you because you are subscribed to > the mailing list . > To unsubscribe, E-mail to: > archives: http://mail.webdna.us/list/talk@webdna.us > Bug Reporting: support@webdna.us Stuart Tremain

DOWNLOAD WEBDNA NOW!

Top Articles:

Talk List

The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...

Related Readings:

test (1998) WebCatalog vs. Cold Fusion (1998) Where is f2? (1997) Web Catalog 2 demo (1997) Bug? (1997) 2 Nt's (1998) OT: Amazon Patents (2000) quitting (1997) WCS Newbie question (1997) Summing fields (1997) Emailer Problem (2000) Still Stumped on ShowNext...HELP! (1997) HTML encoding in URLs (1997) New Web Site Developers Database (1996) formulas.db (1999) [url] (1997) Two submit buttons ? (1997) Force leading zeros (1998) Webstar 1.3.1 PPC (1997) 2.0 Info (1997)