SHA1 generator in L9

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

SHA1 generator in L9

Anibal Escobar
Hi, I'm on Lasso 9. I'm trying to get an SHA1 hash for an ecommerce  
transaction submission.  They need an sha1 hash without the HMAC  
variant (no secret key or password).  What can I use?

Thanks,
Anibal Escobar
[hidden email]




#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: SHA1 generator in L9

stevepiercy
I assume it is dependent on what is installed on the OS, e.g. available in OpenSSL.

So first do this:
http://www.lassosoft.com/lassoDocs/languageReference/obj/cipher_list

cipher_list

Then try this:
http://www.lassosoft.com/lassoDocs/languageReference/obj/cipher_encrypt

cipher_encrypt('mydata', -cipher='sha1', -key='mykey')

--steve


On 11/29/12 at 6:26 PM, [hidden email] (Anibal Escobar) pronounced:

> Hi, I'm on Lasso 9. I'm trying to get an SHA1 hash for an ecommerce transaction
> submission.  They need an sha1 hash without the HMAC variant (no secret key or
> password).  What can I use?
>
> Thanks,
> Anibal Escobar
> [hidden email]
>
>
>
>
> #############################################################
> This message is sent to you because you are subscribed to
>  the mailing list Lasso
> [hidden email]
> To unsubscribe, E-mail to: <[hidden email]>
> Send administrative queries to  <[hidden email]>

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Steve Piercy               Web Site Builder               Soquel, CA
<[hidden email]>                  <http://www.StevePiercy.com/>

#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: SHA1 generator in L9

stevepiercy
Oops, you wanted without the -key.  Hmm....  I'd have to dig into the Lasso 9 source.

--steve


On 11/29/12 at 3:52 PM, [hidden email] (Steve Piercy - Web Site Builder) pronounced:

> I assume it is dependent on what is installed on the OS, e.g. available in
> OpenSSL.
>
> So first do this:
> http://www.lassosoft.com/lassoDocs/languageReference/obj/cipher_list
>
> cipher_list
>
> Then try this:
> http://www.lassosoft.com/lassoDocs/languageReference/obj/cipher_encrypt
>
> cipher_encrypt('mydata', -cipher='sha1', -key='mykey')
>
> --steve
>
>
> On 11/29/12 at 6:26 PM, [hidden email] (Anibal Escobar) pronounced:
>
> > Hi, I'm on Lasso 9. I'm trying to get an SHA1 hash for an ecommerce transaction
> > submission.  They need an sha1 hash without the HMAC variant (no secret key or
> > password).  What can I use?
> >
> > Thanks,
> > Anibal Escobar
> > [hidden email]
> >
> >
> >
> >
> > #############################################################
> > This message is sent to you because you are subscribed to
> >  the mailing list Lasso
> > [hidden email]
> > To unsubscribe, E-mail to: <[hidden email]>
> > Send administrative queries to  <[hidden email]>
>
> -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
> Steve Piercy               Web Site Builder               Soquel, CA
> <[hidden email]>                  <http://www.StevePiercy.com/>
>
> #############################################################
> This message is sent to you because you are subscribed to
>   the mailing list Lasso
> [hidden email]
> To unsubscribe, E-mail to: <[hidden email]>
> Send administrative queries to  <[hidden email]>

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Steve Piercy               Web Site Builder               Soquel, CA
<[hidden email]>                  <http://www.StevePiercy.com/>

#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: SHA1 generator in L9

stevepiercy
No luck there, so I'd resort to either os_process or sys_process
(look in Lasso 9 source for implementation of latter).  Here's
the Terminal command.

     openssl dgst -sha1 [filename]

Do man sha1 in Terminal for more options.

--steve


On 11/29/12 at 3:55 PM, [hidden email] (Steve Piercy - Web
Site Builder) pronounced:

>Oops, you wanted without the -key.  Hmm....  I'd have to dig
>into the Lasso 9 source.
>
>--steve
>
>
>On 11/29/12 at 3:52 PM, [hidden email] (Steve Piercy - Web
>Site Builder) pronounced:
>
>>I assume it is dependent on what is installed on the OS, e.g.
>>available in OpenSSL.
>>
>>So first do this:
>>http://www.lassosoft.com/lassoDocs/languageReference/obj/cipher_list
>>
>>cipher_list
>>
>>Then try this:
>>http://www.lassosoft.com/lassoDocs/languageReference/obj/cipher_encrypt
>>
>>cipher_encrypt('mydata', -cipher='sha1', -key='mykey')
>>
>>--steve
>>
>>
>>On 11/29/12 at 6:26 PM, [hidden email] (Anibal Escobar) pronounced:
>>
>>>Hi, I'm on Lasso 9. I'm trying to get an SHA1 hash for an ecommerce
>transaction
>>>submission.  They need an sha1 hash without the HMAC variant
>>>(no secret key or password).  What can I use?
>>>
>>>Thanks,
>>>Anibal Escobar
>>>[hidden email]
>>>
>>>
>>>
>>>
>>>#############################################################
>>>This message is sent to you because you are subscribed to
>>>the mailing list Lasso
>>>[hidden email]
>>>To unsubscribe, E-mail to: <[hidden email]>
>>>Send administrative queries to  <[hidden email]>
>>
>>-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
>>Steve Piercy               Web Site Builder               Soquel, CA
>><[hidden email]>                  <http://www.StevePiercy.com/>
>>
>>#############################################################
>>This message is sent to you because you are subscribed to
>>the mailing list Lasso
>>[hidden email]
>>To unsubscribe, E-mail to: <[hidden email]>
>>Send administrative queries to  <[hidden email]>
>
>-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
>Steve Piercy               Web Site Builder               Soquel, CA
><[hidden email]>                  <http://www.StevePiercy.com/>
>
>#############################################################
>This message is sent to you because you are subscribed to
>the mailing list Lasso
>[hidden email]
>To unsubscribe, E-mail to: <[hidden email]>
>Send administrative queries to  <[hidden email]>

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- --
Steve Piercy               Web Site Builder              
Soquel, CA
<[hidden email]>                  <http://www.StevePiercy.com/>

#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: SHA1 generator in L9

Anibal Escobar
Hmm, that seems to only work for files.  On a string it gives a file  
not found error.  When I put the string I want in a file and run the  
command on that file, I can get a result, but it doesn't match the  
result given by the online sha1 generators.

Thanks,
Anibal Escobar
[hidden email]




On Nov 29, 2012, at 7:05 PM, Steve Piercy - Web Site Builder wrote:

> No luck there, so I'd resort to either os_process or sys_process  
> (look in Lasso 9 source for implementation of latter).  Here's the  
> Terminal command.
>
>    openssl dgst -sha1 [filename]
>
> Do man sha1 in Terminal for more options.
>
> --steve
>
>
> On 11/29/12 at 3:55 PM, [hidden email] (Steve Piercy - Web Site  
> Builder) pronounced:
>
>> Oops, you wanted without the -key.  Hmm....  I'd have to dig into  
>> the Lasso 9 source.
>>
>> --steve
>>
>>
>> On 11/29/12 at 3:52 PM, [hidden email] (Steve Piercy - Web  
>> Site Builder) pronounced:
>>
>>> I assume it is dependent on what is installed on the OS, e.g.  
>>> available in OpenSSL.
>>>
>>> So first do this:
>>> http://www.lassosoft.com/lassoDocs/languageReference/obj/cipher_list
>>>
>>> cipher_list
>>>
>>> Then try this:
>>> http://www.lassosoft.com/lassoDocs/languageReference/obj/cipher_encrypt
>>>
>>> cipher_encrypt('mydata', -cipher='sha1', -key='mykey')
>>>
>>> --steve
>>>
>>>
>>> On 11/29/12 at 6:26 PM, [hidden email] (Anibal Escobar)  
>>> pronounced:
>>>
>>>> Hi, I'm on Lasso 9. I'm trying to get an SHA1 hash for an ecommerce
>> transaction
>>>> submission.  They need an sha1 hash without the HMAC variant (no  
>>>> secret key or password).  What can I use?
>>>>
>>>> Thanks,
>>>> Anibal Escobar
>>>> [hidden email]
>>>>
>>>>
>>>>
>>>>
>>>> #############################################################
>>>> This message is sent to you because you are subscribed to
>>>> the mailing list Lasso
>>>> [hidden email]
>>>> To unsubscribe, E-mail to: <[hidden email]>
>>>> Send administrative queries to  <[hidden email]>
>>>
>>> -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
>>> Steve Piercy               Web Site Builder               Soquel, CA
>>> <[hidden email]>                  <http://www.StevePiercy.com/>
>>>
>>> #############################################################
>>> This message is sent to you because you are subscribed to
>>> the mailing list Lasso
>>> [hidden email]
>>> To unsubscribe, E-mail to: <[hidden email]>
>>> Send administrative queries to  <[hidden email]>
>>
>> -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
>> Steve Piercy               Web Site Builder               Soquel, CA
>> <[hidden email]>                  <http://www.StevePiercy.com/>
>>
>> #############################################################
>> This message is sent to you because you are subscribed to
>> the mailing list Lasso
>> [hidden email]
>> To unsubscribe, E-mail to: <[hidden email]>
>> Send administrative queries to  <[hidden email]>
>
> -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
> Steve Piercy               Web Site Builder               Soquel, CA
> <[hidden email]>                  <http://www.StevePiercy.com/>
>
> #############################################################
> This message is sent to you because you are subscribed to
> the mailing list Lasso
> [hidden email]
> To unsubscribe, E-mail to: <[hidden email]>
> Send administrative queries to  <[hidden email]>

#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: SHA1 generator in L9

Wade Maxfield
On 30/11/2012, at 2:08 PM, Anibal Escobar <[hidden email]> wrote:

> Hmm, that seems to only work for files.  On a string it gives a file not found error.  When I put the string I want in a file and run the command on that file, I can get a result, but it doesn't match the result given by the online sha1 generators.
>
> Thanks,
> Anibal Escobar
> [hidden email]
>


What if you change the command to:

echo "your string here" | openssl dgst -sha1

 - Wade


#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: SHA1 generator in L9

stevepiercy
In reply to this post by Anibal Escobar
man sha1:

        file...
            file or files to digest. If no files are specified
then standard input is used.

So pipe the string into standard input, like Wade suggested.

$echo 'moosehair' | openssl dgst -sha1
bbaa946dd19dbad63aed8eaecc52955b93d8938e

--steve


On 11/29/12 at 8:08 PM, [hidden email] (Anibal Escobar) pronounced:

>Hmm, that seems to only work for files.  On a string it gives a
>file not found error.  When I put the string I want in a file
>and run the command on that file, I can get a result, but it
>doesn't match the result given by the online sha1 generators.
>
>Thanks,
>Anibal Escobar
>[hidden email]
>
>
>
>
>On Nov 29, 2012, at 7:05 PM, Steve Piercy - Web Site Builder wrote:
>
>>No luck there, so I'd resort to either os_process or
>>sys_process (look in Lasso 9 source for implementation of
>>latter).  Here's the Terminal command.
>>
>>openssl dgst -sha1 [filename]
>>
>>Do man sha1 in Terminal for more options.
>>
>>--steve
>>
>>
>>On 11/29/12 at 3:55 PM, [hidden email] (Steve Piercy -
>>Web Site Builder) pronounced:
>>
>>>Oops, you wanted without the -key.  Hmm....  I'd have to dig
>>>into the Lasso 9 source.
>>>
>>>--steve
>>>
>>>
>>>On 11/29/12 at 3:52 PM, [hidden email] (Steve Piercy -
>>>Web Site Builder) pronounced:
>>>
>>>>I assume it is dependent on what is installed on the OS,
>>>>e.g. available in OpenSSL.
>>>>
>>>>So first do this:
>>>>http://www.lassosoft.com/lassoDocs/languageReference/obj/cipher_list
>>>>
>>>>cipher_list
>>>>
>>>>Then try this:
>>>>http://www.lassosoft.com/lassoDocs/languageReference/obj/cipher_encrypt
>>>>
>>>>cipher_encrypt('mydata', -cipher='sha1', -key='mykey')
>>>>
>>>>--steve
>>>>
>>>>
>>>>On 11/29/12 at 6:26 PM, [hidden email] (Anibal Escobar) pronounced:
>>>>
>>>>>Hi, I'm on Lasso 9. I'm trying to get an SHA1 hash for an ecommerce
>>>transaction
>>>>>submission.  They need an sha1 hash without the HMAC
>>>>>variant (no secret key or password).  What can I use?
>>>>>
>>>>>Thanks,
>>>>>Anibal Escobar
>>>>>[hidden email]
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>#############################################################
>>>>>This message is sent to you because you are subscribed to
>>>>>the mailing list Lasso
>>>>>[hidden email]
>>>>>To unsubscribe, E-mail to: <[hidden email]>
>>>>>Send administrative queries to  <[hidden email]>
>>>>
>>>>-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
>>>>Steve Piercy               Web Site Builder               Soquel, CA
>>>><[hidden email]>                  <http://www.StevePiercy.com/>
>>>>
>>>>#############################################################
>>>>This message is sent to you because you are subscribed to
>>>>the mailing list Lasso
>>>>[hidden email]
>>>>To unsubscribe, E-mail to: <[hidden email]>
>>>>Send administrative queries to  <[hidden email]>
>>>
>>>-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
>>>Steve Piercy               Web Site Builder               Soquel, CA
>>><[hidden email]>                  <http://www.StevePiercy.com/>
>>>
>>>#############################################################
>>>This message is sent to you because you are subscribed to
>>>the mailing list Lasso
>>>[hidden email]
>>>To unsubscribe, E-mail to: <[hidden email]>
>>>Send administrative queries to  <[hidden email]>
>>
>>-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
>>Steve Piercy               Web Site Builder               Soquel, CA
>><[hidden email]>                  <http://www.StevePiercy.com/>
>>
>>#############################################################
>>This message is sent to you because you are subscribed to
>>the mailing list Lasso
>>[hidden email]
>>To unsubscribe, E-mail to: <[hidden email]>
>>Send administrative queries to  <[hidden email]>
>
>#############################################################
>This message is sent to you because you are subscribed to
>the mailing list Lasso
>[hidden email]
>To unsubscribe, E-mail to: <[hidden email]>
>Send administrative queries to  <[hidden email]>

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- --
Steve Piercy               Web Site Builder              
Soquel, CA
<[hidden email]>                  <http://www.StevePiercy.com/>

#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: SHA1 generator in L9

Brad Lindsay-2
In reply to this post by stevepiercy
On Nov 29, 2012, at 6:52 PM, Steve Piercy - Web Site Builder <[hidden email]> wrote:
> I assume it is dependent on what is installed on the OS, e.g. available in OpenSSL.
>
> So first do this:
> http://www.lassosoft.com/lassoDocs/languageReference/obj/cipher_list
>
> cipher_list

To see the list of digest hashing methods available, you have to do cipher_list(-digest)

When I do that, I get SHA1 listed. However, when I use it, I get different results from the command-line:

Lasso Code
   cipher_digest('moosehair', -digest='SHA1', -hex)
Result
   0fdd9471405b4c44eb338f9ad2b046eedf11d714

Command-Line
   echo 'moosehair' | openssl dgst -sha1
Result
   bbaa946dd19dbad63aed8eaecc52955b93d8938e



Anyone know why?
Brad
#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: SHA1 generator in L9

Brad Lindsay-2

On Nov 30, 2012, at 8:31 AM, Brad Lindsay <[hidden email]> wrote:

> On Nov 29, 2012, at 6:52 PM, Steve Piercy - Web Site Builder <[hidden email]> wrote:
>> I assume it is dependent on what is installed on the OS, e.g. available in OpenSSL.
>>
>> So first do this:
>> http://www.lassosoft.com/lassoDocs/languageReference/obj/cipher_list
>>
>> cipher_list
>
> To see the list of digest hashing methods available, you have to do cipher_list(-digest)
>
> When I do that, I get SHA1 listed. However, when I use it, I get different results from the command-line:
>
> Lasso Code
>   cipher_digest('moosehair', -digest='SHA1', -hex)
> Result
>   0fdd9471405b4c44eb338f9ad2b046eedf11d714
>
> Command-Line
>   echo 'moosehair' | openssl dgst -sha1
> Result
>   bbaa946dd19dbad63aed8eaecc52955b93d8938e
>
>
>
> Anyone know why?

Figured it out. The command "echo" outputs an additional newline which you can turn off with the "-n" option:

Command-Line
   echo -n 'moosehair' | openssl dgst -sha1                                                                                     Result
   0fdd9471405b4c44eb338f9ad2b046eedf11d714

All that to say that Anibal probably doesn't have to use [sys_process], but can instead use [cipher_digest('moosehair', -digest='SHA1', -hex)] if "SHA1" is listed when you run [cipher_list(-digest)]


Brad
#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: SHA1 generator in L9

Anibal Escobar
That's the answer.

Thank you very much,
Anibal Escobar
[hidden email]




On Nov 30, 2012, at 9:18 AM, Brad Lindsay wrote:

> All that to say that Anibal probably doesn't have to use  
> [sys_process], but can instead use [cipher_digest('moosehair', -
> digest='SHA1', -hex)] if "SHA1" is listed when you run [cipher_list(-
> digest)]
>
>
> Brad
> #############################################################
> This message is sent to you because you are subscribed to
>  the mailing list Lasso
> [hidden email]
> To unsubscribe, E-mail to: <[hidden email]>
> Send administrative queries to  <[hidden email]>

#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>