SHA-1 Encryption
Mike Bannon
Hi All |
|
Hi Mike,
last year i had to create a HMAC-SHA-256 Encryption for credit card transactions. I. used the .NET system.security.cryptograph which offers all the methods There is also a class for SHA-1 https://learn.microsoft.com/de-de/dotnet/api/system.security.cryptography.sha1?view=net-7.0 may be this works for you Regards Friedrich |
|
Mike Bannon
Hi Friedrich
Thanks for this info. Unfortunately, as I am still pretty much a .net virgin, I wouldn’t know how to go about using that utility, or the info in the link! L Could you give me an example, if it’s not too much trouble?
TIA Mike Bannon DataFormation Ltd., UK
From: main@magicu-l.groups.io [mailto:main@magicu-l.groups.io] On Behalf Of Friedrich Geisler-Buckert
Hi Mike, |
|
Roberto Ramirez Cervantes
I would like to know that too! -- Roberto Ramirez marionette_66@... On Tue, Jan 17, 2023, at 9:05 AM, Mike Bannon wrote:
|
|
Hi all,
Just uploaded a nano code sample in XPA 4.8 that uses .Net to do the job. https://magicu-l.groups.io/g/main/files/SHA1_XPA48.xml Gadi Birman
I know nothing (Manuel) Don't underestimate the power of the Source (GB) |
|
Mike Bannon
Hi Gadi
Thanks for that, that seems to do what I need – I just wish I understood it! :-}
I’d like to get to grips with .NET a bit, but old dog/new tricks etc.
Thanks Mike Bannon DataFormation Ltd., UK
From: main@magicu-l.groups.io [mailto:main@magicu-l.groups.io] On Behalf Of Gadi Birman
Hi all,
I know nothing (Manuel) Don't underestimate the power of the Source (GB) |
|
Hello mike,
I'm saying it from the old dog standpoint. 😊
The program (3) shows the Invoke DotNet along with the equivalent XPA code and remarks. The code is an export from XPA 4.9, but can easily be re-written in earlier XPA versions, and uses no special features of the newer XPA versions.
Gadi Birman
I know nothing (Manuel) Don't underestimate the power of the Source (GB) |
|
Mike Bannon
Hi Gadi
Thanks again for this. I’ll have to study it in more detail as soon as I have time, but after just a quick look I think I largely follow what’s going on!
And it imports fine into xpa 3.2, BTW J
Regards Mike
From: main@magicu-l.groups.io [mailto:main@magicu-l.groups.io] On Behalf Of Gadi Birman
[Edited Message Follows] Hello mike,
I'm saying it from the old dog standpoint. 😊
The program (3) shows the Invoke DotNet along with the equivalent XPA code and remarks. The code is an export from XPA 4.9, but can easily be re-written in earlier XPA versions, and uses no special features of the newer XPA versions.
--
I know nothing (Manuel) Don't underestimate the power of the Source (GB) |
|
Hi Mike,
Very good to know (and somewhat surprising) that the 4.9 export could be successfully imported to version 3.2 J Thanks! -- Gadi Birman
I know nothing (Manuel) Don't underestimate the power of the Source (GB) |
|
Roberto Ramirez Cervantes
Gadi,
Thank you so very much for the code. It is simple and it just works. I actually spent a couple of days programming the SHA-512 logic using only XPA but when I got to the 80 recurring loops logic where the actual hashing magic occurs, I did not see a way to get either an improvement nor the same performance from the existing .net security library. For me, I think this is one of the main road blocks to approach .NET; the fact that there is a security library already installed in my computer (and presumably, in all Windows computers) ready to calculate this hash, but I did not know it existed, or the path for this library, or what other libraries do I need to use, or the sequence of calls to these libraries to get the resulting hash. Roberto |
|
Craig Martin
Roberto, Roberto,
Attempting to implement SHA-512 in Magic is surely listed in DSM-5 as a psychiatric disorder.
Roberto, meet Stack Overflow. Roberto, please make the acquaintance of ChatGPT and Github CoPilot.
Yes, you can stuff square pegs into round holes, but learn to write this stuff in c# or python and you can bring it back to Magic easier.
And then decide that using Magic dotnet methods is some kind of self-flagellation.
Life is too short for this shit.
Let's have a beer in BlackCat or Din Tai Fung sometime soon.
From: main@magicu-l.groups.io <main@magicu-l.groups.io> on behalf of Roberto Ramirez Cervantes <marionette_66@...>
Sent: Friday, January 27, 2023 2:25 PM To: main@magicu-l.groups.io <main@magicu-l.groups.io> Subject: Re: [magicu-l] SHA-1 Encryption Gadi,
Thank you so very much for the code. It is simple and it just works. I actually spent a couple of days programming the SHA-512 logic using only XPA but when I got to the 80 recurring loops logic where the actual hashing magic occurs, I did not see a way to get either an improvement nor the same performance from the existing .net security library. For me, I think this is one of the main road blocks to approach .NET; the fact that there is a security library already installed in my computer (and presumably, in all Windows computers) ready to calculate this hash, but I did not know it existed, or the path for this library, or what other libraries do I need to use, or the sequence of calls to these libraries to get the resulting hash. Roberto |
|
Heidi Schuppenhauer
Thank you so much for that! It just so happens I very much needed this exact thing, and it works perfectly.
|
|
Roberto Ramirez Cervantes
Craig,
I think your idea of becoming a shepherd for Magic developers that want to branch out and use the available resources of other programming tools\languages is excellent! When is your first session? Roberto |
|
Craig Martin
"He's no shepherd, he's just a very naughty boy"
There's always a beer with your name on it in Snohomish, Roberto. Alternatively, Black Cat next week
🙂
From: main@magicu-l.groups.io <main@magicu-l.groups.io> on behalf of Roberto Ramirez Cervantes <marionette_66@...>
Sent: Wednesday, February 1, 2023 1:52 PM To: main@magicu-l.groups.io <main@magicu-l.groups.io> Subject: Re: [magicu-l] SHA-1 Encryption Craig,
I think your idea of becoming a shepherd for Magic developers that want to branch out and use the available resources of other programming tools\languages is excellent! When is your first session? Roberto |
|
Todd Baremore
Funny, I asked the same question. Got as far as you did.
toggle quoted message
Show quoted text
Todd On 2/1/2023 4:52 PM, Roberto Ramirez
Cervantes wrote:
Craig, |
|