ALERT: Some images may not load properly within the Knowledge Base Article. If you see a broken image, please right-click and select 'Open image in a new tab'. We apologize for this inconvenience.

TDM 4.10 Portal - HASHBYTES Function is not working as expected


Article ID: 237982


Updated On:


CA Test Data Manager (Data Finder / Grid Tools)


When trying to use the HASHBYTES function in SQL Server to generate a hash value in TDM Portal seems to be generating invalid values and generating new value each time even though the input is fixed.
For example: Running the query SELECT HASHBYTES('SHA2_256', 'dslfdkjLK85kldhnv$n000#knf'); in SQL Server 2019 returns the output as 0x7B9ED39D4A842FCAA7AAA97D0C3B24FA373C1EA42E984795830E65DA210245B9 but when running the same query @execsql(R,SELECT HASHBYTES('SHA2_256', 'dslfdkjLK85kldhnv$n000#knf'))@  in TDM Portal returns the output as [[email protected]




Release : 4.10

Component : Web Portal - Generator


The patch address this issue and also recommended to use the new metafunction execsqlhex instead of execsql to get the output when call generates a byte array, which will be transformed into a hex string.

@execsql(R,SELECT HASHBYTES('SHA2_256', 'dslfdkjLK85kldhnv$n000#knf'))@ -->@execsqlhex(R,SELECT HASHBYTES('SHA2_256', 'dslfdkjLK85kldhnv$n000#knf'))@