ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Issues translating PowerShell to LabVIEW (finding Assembly & Error 3008)


@xingdx wrote:

hello

    i want to calculate the sha1 by powershell in vi,how can i get the feedback; i have achieved it by cmd,but the time by this method is too long;

thanks


Why use the powershell?

 

.NET can be used directly, and you'll get all the feedback you want. The data size also won't be a problem anymore, because you can stream your data into the SHA1 method.

 

Assuming .NET has SHA1 methods, but I'm pretty sure it does.

0 Kudos
Message 11 of 19
(1,856 Views)

yes,i am try to find some .Net constructor to calculate the SHA1 or other HASH,but i am fail.

 Could you give me some help?

0 Kudos
Message 12 of 19
(1,844 Views)

thank you for your help

0 Kudos
Message 14 of 19
(1,834 Views)

wiebe@CARYA wrote:

SHA1 Class (System.Security.Cryptography) | Microsoft Docs


I had to use this one recently - this bit me:

if you want to calculate an sha1 hash, from within LabView, you need to start with "System.Core" not "System.Security.Cryptography"

 

alexderjuengere_0-1616447831278.png

 

 

sha1_labviewdotnet.png

0 Kudos
Message 15 of 19
(1,814 Views)

yes

  when i used the System.Security.Cryptography,the feedback is :This assembly does not include any public classes that can be created ; 

i am try to solve it in some method ,but up to now ,it is failed;

thanks

0 Kudos
Message 16 of 19
(1,799 Views)

Hi Alex,

 

the example is nice, but you can replace the FOR loop by a simple ConcatString operation with just one input…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 17 of 19
(1,787 Views)

@alexderjuengere wrote:

wiebe@CARYA wrote:

SHA1 Class (System.Security.Cryptography) | Microsoft Docs


I had to use this one recently - this bit me:

if you want to calculate an sha1 hash, from within LabView, you need to start with "System.Core" not "System.Security.Cryptography"


Well, obviously 😉.

 

In the msdn, change the Version to your .NET Framework, then the documentation will mention the assembly: 

 

dotNET Assembly.PNG

Message 18 of 19
(1,784 Views)

@GerdW wrote:

Hi Alex,

 

the example is nice, but you can replace the FOR loop by a simple ConcatString operation with just one input…


Kudos to you!

sha1-labviewdotnet.png

0 Kudos
Message 19 of 19
(1,760 Views)