Data360 Analyze

 View Only
  • 1.  Hashing Data to verify integrity

    Employee
    Posted 04-24-2021 13:39

    Hello! 

    I'm hoping I can get some help getting started, please. I have PPI that I need to share with a 3rd party. However, I want to make sure the data has not changed when it returns to us. 

    I've been using the encrypt nodes, but it's a lot of data and a much simpler hash would do, we're just trying to quickly match hashes and make sure the data is the same once it returns to us.

    So what's the simplest way:

    1. to grab all the columns, combine them
    2. hash that new combined column
    3. then import again, hash and compare the hashes

    Any tips would help, thank you!



  • 2.  RE: Hashing Data to verify integrity

    Employee
    Posted 04-26-2021 06:50

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    I think this will get you started at least. Using a Transform node, I took it that you wanted all of the data on single row and then to hash the combination of that row. On each new row variable toHash is set to a blank string, from there I just keep on appending the data into a large string (excluding Nulls) and then finally use hash() on it, to get a has for a row.

    toHash = ''

    for fn in fields:
    fv = str(in1[fn])
    if fv is not Null:
    toHash += fv

    hashValue = hash(toHash)
    out1.HashResult = hashValue


  • 3.  RE: Hashing Data to verify integrity

    Employee
    Posted 05-16-2021 13:41

    Thanks so much Gerry! I'm having trouble getting any rows out, could you please have a look and help me understand what I'm doing wrong?

     

     

    Attached files

    HasshingAddresses.lna

     



  • 4.  RE: Hashing Data to verify integrity

    Employee
    Posted 05-18-2021 01:52

    You need to define the metadata for the new output field that is to hold the computed hash value. In the example below a 'long' data type is being used (but you could specify it as 'unicode' if you wanted the value to be output as a string instead of a numeric value). The final statement in the ProcessRecords script assigns the hash value to the new field in the output record.