Synchronization Project Not able to Decrypt the Password

I am updating the Sync Project (Native DB Connector) variable CP_Password (Secret Value).  

1. PAM call the OIM script to update the password in custom table ( i have verified the password by decryption, it is correct) value stored like [C]ddff[C]

2. Process will trigger to Update Sync Project using given script code.

Dim decryptor As VI.Projector.Security.DatabaseEncryption = New VI.Projector.Security.DatabaseEncryption(Connection.Session)

DPRVariable.PutValue("Value",decryptor.Encrypt(session.Decrypt(dummy.GetValue("CCC_DBPassword").ToString())))
uow.Put(DPRVariable)
uow.Commit()

3. I can see the value updated in CP_Password like [E]sdff[E]

4. Sync project Job Failed. 

Am I doing correct encryption ? 

I have tried this as well but not luck . in this encryption password stored like [C]dggdd[C] . 

DPRVariable.PutValue("Value",connection.Encryption.Encrypt(session.Decrypt(AppFactory.GetValue("CCC_DBPassword").ToString())))

                                                                                                        

  • Maybe you could fetch the value of the configuration parameter using a scripted variable (change the variable in Sync project by clicking on the convert icon)

    Ex: return args.QueryDatabase(Connection.SystemQuery.From("CCC_Table").Select("CCC_DBPassword").Filter("CCC_DBName='Your BD Name'")).Result.First.GetValue("CCC_DBPassword").AsString