22&Scoped-define FRAME-NAME chgid-frame
33/*------------------------------------------------------------------------
44/************************************************************ */
5- /* Copyright (c) 1984-2005,2012 by Progress Software Corporation */
5+ /* Copyright (c) 1984-2005,2012,2025 by Progress Software Corporation */
66/* */
77/* All rights reserved. No part of this program or document */
88/* may be reproduced in any form or by any means without */
3838 into RAW 20050620-031.
3939 kmcintos Oct 26, 2005 Assigning hex-decode output to temp var before
4040 comparison 20050928-003.
41- rkmaboj 05/02/2012 fixed unknown record creation, when creating record first time.
41+ rkmaboj 05/02/2012 fixed unknown record creation, when creating record first time.
42+ tmasood 09/04/2025 Added new argument in ENCRYPT-AUDIT-MAC-KEY method
4243------------------------------------------------------------------------ */
4344/* This .W file was created with the Progress AppBuilder. */
4445/*---------------------------------------------------------------------- */
@@ -270,6 +271,8 @@ ON END-ERROR OF FRAME {&FRAME-NAME}
270271ON GO OF FRAME {&FRAME-NAME } DO :
271272 DEFINE VARIABLE tmpRaw AS RAW .
272273 DEFINE VARIABLE rawBI AS RAW .
274+ DEFINE VARIABLE cMacKey AS CHARACTER .
275+ DEFINE VARIABLE cOldMacKey AS CHARACTER .
273276
274277 IF NOT tbBlank :CHECKED AND
275278 glMacMod AND
@@ -288,8 +291,8 @@ ON GO OF FRAME {&FRAME-NAME} DO:
288291 phDbDetail :BUFFER-CREATE ().
289292 IF NOT phOldBuff :AVAILABLE THEN
290293 DO :
291- tmpRaw = HEX-DECODE ( AUDIT-POLICY :ENCRYPT-AUDIT-MAC-KEY (" _db-id-mnt_initial_" ) ).
292- ASSIGN phDbDetail ::_db-mac-key = tmpRaw
294+ cMacKey = AUDIT-POLICY :ENCRYPT-AUDIT-MAC-KEY (" _db-id-mnt_initial_" , " ae2h6 " ).
295+ ASSIGN PUT-STRING ( phDbDetail ::_db-mac-key , 1 , LENGTH ( cMacKey )) = cMacKey
293296 phDbDetail ::_db-description = " PROGRESSST"
294297 phDbDetail ::_db-custom-detail = " " .
295298 END .
@@ -310,10 +313,12 @@ ON GO OF FRAME {&FRAME-NAME} DO:
310313 phDbDetail ::_db-mac-key = tmpRaw .
311314 END .
312315 ELSE DO :
313- tmpRaw = HEX-DECODE (AUDIT-POLICY :ENCRYPT-AUDIT-MAC-KEY (fiMacKey :SCREEN-VALUE )).
314-
315- IF phOldBuff :AVAILABLE AND tmpRaw NE phOldBuff ::_db-mac-key THEN
316- phDbDetail ::_db-mac-key = tmpRaw .
316+ IF phOldBuff :AVAILABLE THEN DO :
317+ cOldMacKey = GET-STRING (phOldBuff ::_db-mac-key , 1 ).
318+ cMacKey = AUDIT-POLICY :ENCRYPT-AUDIT-MAC-KEY (fiMacKey :SCREEN-VALUE , " ae2h6" ).
319+ IF cOldMacKey <> cMacKey THEN
320+ PUT-STRING (phDbDetail ::_db-mac-key , 1 , LENGTH (cMacKey )) = cMacKey .
321+ END .
317322 END .
318323 END .
319324 ELSE IF tbBlank :CHECKED EQ FALSE AND
0 commit comments