There are little stone slabs with messages, for the first code. The second code may require you to look it up, but it is the standard hex code with "FFA___" you just need to input the numbers
Not sure if I'm doing it wrong. The slabs I'm seeing are about the dungeon rats home and the other about a dumb father inputting a code for the password as 'Code".