Hash

Hash

Calculates the hash of a value returned by a subgenerator using the specified digest algorithm. Available: [SHA-1, SHA1, SHA-384, OID.1.3.14.3.2.26, 2.16.840.1.101.3.4.2.2, SHA, 2.16.840.1.101.3.4.2.1, 2.16.840.1.101.3.4.2.4, 2.16.840.1.101.3.4.2.3, OID.2.16.840.1.101.3.4.2.4, OID.2.16.840.1.101.3.4.2.3, OID.2.16.840.1.101.3.4.2.2, 1.3.14.3.2.26, OID.2.16.840.1.101.3.4.2.1, SHA-224, SHA-256, MD2, SHA-512, MD5]

Attributes
Name Description Required Min Max Allowed Values
seed Random number generator seed of this Element. Overrides default seeding behavior. no 0 1
name (Class)Name of this element. Used to identify plugin Class. Full name is required. Example: com.en.myPluginPackage.myPuginClass no 0 1
id Identification String of this element. May be used to uniquely identify a field within the children of an Element. no 0 1
Nodes
Name Description Required Min Max Allowed Values
digest Content type: String (must be a valid digest algorithm)
Select the message digest algorithm. Available: [SHA-1, SHA1, SHA-384, OID.1.3.14.3.2.26, 2.16.840.1.101.3.4.2.2, SHA, 2.16.840.1.101.3.4.2.1, 2.16.840.1.101.3.4.2.4, 2.16.840.1.101.3.4.2.3, OID.2.16.840.1.101.3.4.2.4, OID.2.16.840.1.101.3.4.2.3, OID.2.16.840.1.101.3.4.2.2, 1.3.14.3.2.26, OID.2.16.840.1.101.3.4.2.1, SHA-224, SHA-256, MD2, SHA-512, MD5]
yes 1 1
  • SHA-1
  • SHA1
  • SHA-384
  • OID.1.3.14.3.2.26
  • 2.16.840.1.101.3.4.2.2
  • SHA
  • 2.16.840.1.101.3.4.2.1
  • 2.16.840.1.101.3.4.2.4
  • 2.16.840.1.101.3.4.2.3
  • OID.2.16.840.1.101.3.4.2.4
  • OID.2.16.840.1.101.3.4.2.3
  • OID.2.16.840.1.101.3.4.2.2
  • 1.3.14.3.2.26
  • OID.2.16.840.1.101.3.4.2.1
  • SHA-224
  • SHA-256
  • MD2
  • SHA-512
  • MD5
gen Value Generator for this field no 0 1
  • pdgf.generator.MarkovChainText
  • pdgf.generator.AsReferenceChoice
  • pdgf.generator.WeightedListItem
  • pdgf.generator.DetailFromDate
  • pdgf.generator.BuildList
  • pdgf.generator.InsertIntoString
  • pdgf.generator.UUID
  • pdgf.generator.Probability
  • pdgf.generator.RandomString
  • pdgf.generator.Sequential
  • pdgf.generator.ConvertNumberToString
  • pdgf.generator.WeightedSubListItem
  • pdgf.generator.RandomListItems
  • pdgf.generator.Email
  • pdgf.generator.ActionDeleteIsAlsoUpdate
  • pdgf.generator.DoubleNumber
  • pdgf.generator.Permutation
  • pdgf.generator.Switch
  • pdgf.generator.ReferenceValue
  • pdgf.generator.ForFormula
  • pdgf.generator.PrePostfix
  • pdgf.generator.StaticValue
  • pdgf.generator.Hash
  • pdgf.generator.Padding
  • pdgf.generator.FormatString
  • pdgf.generator.DateTime
  • pdgf.generator.Id
  • pdgf.generator.LastChoice
  • pdgf.generator.MaskString
  • pdgf.generator.Null
  • pdgf.generator.AddRandomSeconds
  • pdgf.generator.RandomStringInRange
  • pdgf.generator.Formula
  • pdgf.generator.AbstractDecimal
  • pdgf.generator.FormatFloatingPoint
  • pdgf.generator.OtherFieldValue
  • pdgf.generator.RandomSentence
  • pdgf.generator.FormatNumber
  • pdgf.generator.Template
  • pdgf.generator.BigBenchReview
  • pdgf.generator.UpperLowerCase
  • pdgf.generator.For
  • pdgf.generator.Relative
  • pdgf.generator.RandomUniqeString
  • pdgf.generator.PermutationReference
  • pdgf.generator.UpdateActionType
  • pdgf.generator.FormatNumberAsDate
  • pdgf.generator.OldReferenceGeneratorDeprecated
  • pdgf.generator.DictList
  • pdgf.generator.ExtendedFormula
  • pdgf.generator.FormatDateAsNumber
  • pdgf.generator.If
  • pdgf.generator.GlobalRowNumber
  • pdgf.generator.LongNumber
  • pdgf.generator.UnsafeDistinct

Example

  1. MD5 Hash of ID

    Calculates the MD5 hash of the given sub-generator generator, the ID generator in this case.

    Schema config for MD5 Hash of ID
    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <!--
    /*******************************************************************************
    * Copyright (c) 2013, bankmark and/or its affiliates. All rights reserved.
    * bankmark UG PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
    ******************************************************************************/
    --><schema xmlns:doc="http://bankmark.de/pdgf/doc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="demo" xsi:noNamespaceSchemaLocation="structure/pdgfSchema.xsd">
      <!-- All data is derived from this starting seed.
           If this seed is the same, the generated data will the same on each
           computer/node/platform.
           Change this seed to generate a different data set.-->
      <seed>1234567890L</seed>
    
      <rng name="PdgfDefaultRandom"/>
    
      <!--Default Scale factor for all tables -->
      <property name="SF" type="double">1</property>
    
      <table name="HASH">
        <!-- if tables should scale with -SF command line argument.
             Specify your scaling formula here: -->
        <size>10 * ${SF}</size>
    
        <!--MD5 Hash of ID-->
          <!--Calculates the MD5 hash of the given sub-generator generator, the ID generator in this case.-->
          <field name="ID" size="" type="NUMERIC">
            <gen_Id>
            </gen_Id>
          </field>
          <field name="MD5_hash" size="" type="NUMERIC">
            <gen_Hash>
              <digest>MD5</digest>
              <gen_Id>
              </gen_Id>
            </gen_Hash>
          </field>
          </table>
    </schema>
    
    Output for MD5 Hash of ID
    0|CFCD208495D565EF66E7DFF9F98764DA
    1|C4CA4238A0B923820DCC509A6F75849B
    2|C81E728D9D4C2F636F067F89CC14862C
    3|ECCBC87E4B5CE2FE28308FD9F2A7BAF3
    4|A87FF679A2F3E71D9181A67B7542122C
    5|E4DA3B7FBBCE2345D7772B0674A318D5
    6|1679091C5A880FAF6FB5E6087EB1B2DC
    7|8F14E45FCEEA167A5A36DEDD4BEA2543
    8|C9F0F895FB98AB9159F51FD0297E236D
    9|45C48CCE2E2D7FBDEA1AFC51C7C6AD26
2.6_#1486_b758 | 2016-05-24