Dbschema Registration code Generation

Source: Internet
Author: User
Tags cassandra rand razorsql

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.