This is a fork af this file: https://github.com/so-random-dude/oneoffcodes/blob/master/SimpleStringEncrypter.java
I have added a simple GUI just to write each time a different key without the need to modify, compile and run the code by yourself.
The original question was here on StackOverflow: https://stackoverflow.com/questions/39928401/recover-db-password-stored-in-my-dbeaver-connection/39928445#39928445