Since the company project uses Cassandra to store data, it is difficult to look at the data at the command line every time. So on the Internet to find the following several graphical tools:
1.DbSchema
2.Razorsql
3.Dbeaver
Among them, Dbeaver is free and the other two need to be purchased. However, Dbeaver does not support Cassandra and requires the use of third-party drivers. Results after finding a third-party driver, it was found that this driver is more expensive than the other two software, omg~
No way, can only go to the Internet to find Pojie. Because the Razorsql interface is relatively ugly, so the choice of dbschema.
Search the Internet and find a tool to generate the registration code:
Https://blog.riguz.com/it/crack_dbschema.html
Originally wanted to use off-the-shelf tools, but the middle of various setbacks, failed to succeed, so along this buddy's idea wrote a java. Because it's just the occasional use, so not too complicated, just a Java class, here is the code:
Importjava.io.UnsupportedEncodingException;Importjava.security.MessageDigest;Importjava.security.NoSuchAlgorithmException;ImportJava.util.Random; Public classDbschemakeygenerator { Public Static voidMain (string[] args) {String name= "Your_Name"; Try{String key=GenerateKey (name); System.out.println ("Key:" +key); } Catch(NoSuchAlgorithmException |unsupportedencodingexception e) {E.printstacktrace (); } } Private StaticString GenerateKey (string name)throwsnosuchalgorithmexception, unsupportedencodingexception {String Salt=GetSalt (); String Encryptsource= "AX5" + name + "b52w" + Salt + "vb3"; MessageDigest localmessagedigest= Messagedigest.getinstance ("MD5"); String Hash= Formattohex (Localmessagedigest.digest (Encryptsource.getbytes ("UTF-8"))); returnHash.substring (0, 4) + Salt + hash.substring (4); } Private StaticString Formattohex (byte[] paramarrayofbyte) {StringBuilder Localstringbuilder=NewStringBuilder (); for(intm = 0; M < paramarrayofbyte.length; m++) { if((m% = = 0) && (m! = 0) {localstringbuilder.append ("\ n"); } String str=integer.tohexstring (paramarrayofbyte[m]); if(Str.length () < 2) {str= "0" +str; } if(Str.length () > 2) {str= Str.substring (Str.length ()-2); } localstringbuilder.append (str); } returnlocalstringbuilder.tostring (); } Private Static intRandomintMinintmax) { returnRand ()% (Max-min + 1) +min; } Private Static intrand () {return NewRandom (). Nextint (Integer.max_value); } Private StaticString GetSalt () {intr = Random (10000, 30000); returnstring.valueof (R); }}
View Code
Tips: Finally, if there is a condition, but also use more, it is best to buy a genuine bar, the official address:
Https://www.dbschema.com/index.html
Dbschema Registration code Generation