Hello. I'm doing something where I need to generate a password for a tomcat user that is authenticated using org.apache.catalina.realm.UserDatabaseRealm with "sha" digest, the user database is produced by org.apache.catalina.users.MemoryUserDatabaseFactory from an xml file (standard conf/tomcat-users.xml)
Reading https://tomcat.apache.org/tomcat-9.0-doc/realm-howto.html#Digested_Passwords I see that it says: <quote> If you are writing an application that needs to calculate digested passwords dynamically, call the static Digest() method of the org.apache.catalina.realm.RealmBase class, passing the cleartext password, the digest algorithm name and the encoding as arguments. This method will return the digested password. </quote> However, there is no static method Digest in org.apache.catalina.realm.RealmBase. What is the proper way to programmatically generate a proper password hash? Thank you, Pawel.