LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
0 Kudos
cy...

string input for hash function

Status: Declined

Hi community

 

"propose to extend hashing function to include string for hashing sensitive information (1-way)"

 

currently hash function is polymorphic and accepts only path as input, perhaps:

- input terminal can accept both string and path, determining type internally and change accordingly, and

- instead of polymorphic, enum terminal instead?

CY (expired CLAD)
4 Comments
rtollert
Member

@cy... wrote:

currently hash function is polymorphic and accepts only path as input


Have you checked the Numeric→Data Manipulation palette?

2020-08-27-101454_741x466_scrot.png

 


- input terminal can accept both string and path, determining type internally and change accordingly, and

This seems problematic from an API usage perspective. If a user wires in a string representation of a path by accident, they'll be hashing the path, instead of the contents of the file at that path. Better to keep them separate.

 


@cy... wrote:

- instead of polymorphic, enum terminal instead?


This runs the risk of doubling the overhead of using the hash functions when deploying RT VIs through the IDE. The top-level VI can't resolve which hash function is actually in use, so you'll be downloading both the SHA-2 and SHA-3 implementations every time. You could work around this by making the top-level VI inline, but I'm not sure that is the right approach.

cy...
Active Participant

thanks @rtollert

 

data manipulation - was unaware of the byte array function, can definitely add some codes ourselves to convert the message to byte array

API perspective - perhaps check if path exist or maintain as separate functions

doubling overhead - can be done on our end for cases that require functions to be changed programmatically

 

really should have spent some time reading the what's new. thanks for the new functions and explanation on the rationale provided

CY (expired CLAD)
crossrulz
Knight of NI

I just have to note that the Byte Array Checksum.vi is new in LabVIEW 2020.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Christina_R
Active Participant
Status changed to: Declined
 

Christina Rogers
Principal Product Owner, LabVIEW R&D