Transferred from: http://blog.csdn.net/jwzhangjie/article/details/11920059
Install OpenFire today but forget the password after Setup, and then view the data, find the solution
OpenFire password encryption is implemented by Org.jivesoftware.util.Blowfish, but requires encryption to obtain OpenFire Passwordkey, under the installed directory openfire\embedded-db\ Openfire.script inside find
INSERT into Ofproperty VALUES (' Passwordkey ', ' xxxxxxxxxxxx ')//passwordkey
and find it in the same file.
INSERT into Ofuser VALUES (' admin ', NULL, ' 63b8e73c0cbc612ec692196c6d8df0cf54da7c77f9c8752fc3bce938a4818a20 ', ' Administrator ', ' jwzhangjie@163.com ', ' 001379898892206 ', ' 0 ')//encryptedpassword
You can then decrypt it with the following Java code:
Package openfire;
Import Org.jivesoftware.util.Blowfish;
public class OpenFire {
static Blowfish Blowfish = new Blowfish ("xxxxxx");//<span style= "font-family:arial, Helvetica,sans-serif; " >passwordKey</span> public
static void Main (string[] args) {
System.out.println ( Blowfish.decryptstring ("xxxxxxxxxxxxxxxxxxxx")); Encryptedpassword
}
}