IoT CAS Frameworks/IOT_Server/License_Framework/LicenseKeyGenerator/src/com/prokosha/licensekeygenerator/GA_CreateKeys1.java
static StringBuffer dec(StringBuffer sznumber) {
		int ai, ilen;
		// int iTotal = 0;
		// int ai1 = 0;

		char szEncoded1[] = { '9', '7', '8', '5', '6', '1', '0', '4', '2', '3',
				'o', 'n', 'k', 'g', 'z', 'p', 'm', 'e', 'l', 's', 't', 'x',
				'q', 'r', 'y', 'b', 'h', 'f', 'a', 'j', 'c', 'i', 'd', 'u',
				'w', 'v' };
		char szDecoded1[] = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
				'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l',
				'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x',
				'y', 'z' };

		ilen = sznumber.length();
		StringBuffer tempBuffer = new StringBuffer();
		tempBuffer.setLength(26);

		StringBuffer tempBuffer1 = new StringBuffer();
		tempBuffer1.setLength(26);

		for (ai = 0; ai <= ilen - 1; ai++) {
			for (int al = 0; al < szEncoded1.length; al++) {
				boolean flag = false;
				if ((szEncoded1[al] == sznumber.charAt(ai))) {
					tempBuffer.setCharAt(ai, szDecoded1[al]);
					flag = true;
				}
				if (szEncoded1[al] == Character
						.toLowerCase(sznumber.charAt(ai)) && flag == false) {
					tempBuffer.setCharAt(ai,
							Character.toUpperCase(szDecoded1[al]));
				}
			}
		}
		String abc = tempBuffer.toString();
		int aln = abc.length();
		char ac;
		for (int ch = 0; ch < aln; ch++) {
			ac = abc.charAt(ch);
			int intik = (int) ac;
			if ((intik <= 47) || (intik >= 91 && intik <= 96)
					|| (intik >= 58 && intik <= 64) || (intik >= 123))
				continue;
			tempBuffer1.setCharAt(ch, ac);
		}

		System.out.println(" Encoded is...." + sznumber);
		System.out.println(" Decoded is...." + tempBuffer);

		return tempBuffer;
	}
/*
	 * Method dec This method takes the Stringbuffer and decrypt the value which
	 * is exactly opposite to encryption mechanism
	 */
Method dec This method takes the Stringbuffer and decrypt the value which
is exactly opposite to encryption mechanism
Method dec This method takes the Stringbuffer and decrypt the value which is exactly opposite to encryption mechanism
static StringBuffer dec(StringBuffer sznumber) {
		int ai, ilen;
		char szEncoded1[] = { '9', '7', '8', '5', '6', '1', '0', '4', '2', '3',
				'o', 'n', 'k', 'g', 'z', 'p', 'm', 'e', 'l', 's', 't', 'x',
				'q', 'r', 'y', 'b', 'h', 'f', 'a', 'j', 'c', 'i', 'd', 'u',
				'w', 'v' };
		char szDecoded1[] = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
				'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l',
				'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x',
				'y', 'z' };
		ilen = sznumber.length();
		StringBuffer tempBuffer = new StringBuffer();
		tempBuffer.setLength(26);
		StringBuffer tempBuffer1 = new StringBuffer();
		tempBuffer1.setLength(26);
		for (ai = 0; ai <= ilen - 1; ai++) {
			for (int al = 0; al < szEncoded1.length; al++) {
				boolean flag = false;
				if ((szEncoded1[al] == sznumber.charAt(ai))) {
					tempBuffer.setCharAt(ai, szDecoded1[al]);
					flag = true;
				}
				if (szEncoded1[al] == Character
						.toLowerCase(sznumber.charAt(ai)) && flag == false) {
					tempBuffer.setCharAt(ai,
							Character.toUpperCase(szDecoded1[al]));
				}
			}
		}
		String abc = tempBuffer.toString();
		int aln = abc.length();
		char ac;
		for (int ch = 0; ch < aln; ch++) {
			ac = abc.charAt(ch);
			int intik = (int) ac;
			if ((intik <= 47) || (intik >= 91 && intik <= 96)
					|| (intik >= 58 && intik <= 64) || (intik >= 123))
				continue;
			tempBuffer1.setCharAt(ch, ac);
		}
		System.out.println(" Encoded is...." + sznumber);
		System.out.println(" Decoded is...." + tempBuffer);
		return tempBuffer;
	}
static StringBuffer dec ( StringBuffer sznumber ) { int ai , ilen ; char szEncoded1 [ ] = { '9' , '7' , '8' , '5' , '6' , '1' , '0' , '4' , '2' , '3' , 'o' , 'n' , 'k' , 'g' , 'z' , 'p' , 'm' , 'e' , 'l' , 's' , 't' , 'x' , 'q' , 'r' , 'y' , 'b' , 'h' , 'f' , 'a' , 'j' , 'c' , 'i' , 'd' , 'u' , 'w' , 'v' } ; char szDecoded1 [ ] = { '0' , '1' , '2' , '3' , '4' , '5' , '6' , '7' , '8' , '9' , 'a' , 'b' , 'c' , 'd' , 'e' , 'f' , 'g' , 'h' , 'i' , 'j' , 'k' , 'l' , 'm' , 'n' , 'o' , 'p' , 'q' , 'r' , 's' , 't' , 'u' , 'v' , 'w' , 'x' , 'y' , 'z' } ; ilen = sznumber . length ( ) ; StringBuffer tempBuffer = new StringBuffer ( ) ; tempBuffer . setLength ( 26 ) ; StringBuffer tempBuffer1 = new StringBuffer ( ) ; tempBuffer1 . setLength ( 26 ) ; for ( ai = 0 ; ai <= ilen - 1 ; ai ++ ) { for ( int al = 0 ; al < szEncoded1 . length ; al ++ ) { boolean flag = false ; if ( ( szEncoded1 [ al ] == sznumber . charAt ( ai ) ) ) { tempBuffer . setCharAt ( ai , szDecoded1 [ al ] ) ; flag = true ; } if ( szEncoded1 [ al ] == Character . toLowerCase ( sznumber . charAt ( ai ) ) && flag == false ) { tempBuffer . setCharAt ( ai , Character . toUpperCase ( szDecoded1 [ al ] ) ) ; } } } String abc = tempBuffer . toString ( ) ; int aln = abc . length ( ) ; char ac ; for ( int ch = 0 ; ch < aln ; ch ++ ) { ac = abc . charAt ( ch ) ; int intik = ( int ) ac ; if ( ( intik <= 47 ) || ( intik >= 91 && intik <= 96 ) || ( intik >= 58 && intik <= 64 ) || ( intik >= 123 ) ) continue ; tempBuffer1 . setCharAt ( ch , ac ) ; } System . out . println ( " Encoded is...." + sznumber ) ; System . out . println ( " Decoded is...." + tempBuffer ) ; return tempBuffer ; }
Method dec This method takes the Stringbuffer and decrypt the value which
 is exactly opposite to encryption mechanism
Method dec This method takes the Stringbuffer and decrypt the value which is exactly opposite to encryption mechanism
// int iTotal = 0; // int ai1 = 0;