How-to: Produce music on the computer for beginners

Author: admin  //  Category: techno mix

So you have a passion for music and want to produce music of your own? There are a number of ways to get started, and I will cover a few of the most popular ones. To produce music is to have a creative mind and get rewarded for that creativity. Some people are even able to sell and license their music to artists after only a few months of practice.

The first thing to decide is what kind of music you want to produce. There are almost unlimited choices when it comes to producing music. You may choose to make hip hop beats, r&b beats, rap beats, or maybe you like trance or techno. Either way certain tools make it easier to produce certain genres of music.

If you want to start producing trance or techno music, you may want to check out a program called FL Studio. I have found that FL Studio is a good music production program for those looking to get started with trance, techno, electronic, or drum and bass music. However, I would not recommend starting with this program unless you have SOME music production experience as you may find the controls and settings a little bit too technical for your liking.

For those who want to start making hip hop or rap beats, I would suggest a program called Sonic Producer. It’s not exactly a program, it’s more of a complete system to help you constantly improve your music production skills. Sonic Producer is a social music production website that is based around their state of the art music production sequencer.

Membership to the site is only $29, which includes a whole lot: access to their sequencer, which is worth more than double that on its own. It has 16-tracks, an enormous preset instrument library, mp3 export capability, 8 DJ pads, and that’s just scratching the surface. With membership they give you access to an amazing wealth of knowledge right at your fingertips. The community there is very supportive and I have seen newbies go from no music production experience to selling their beats to artists with a Sonic Producer membership in a matter of months.

After you become proficient at making beats and producing music, you can start to integrate offline music production programs into the mix. You see, I like to use my offline programs like FL studio for creating beats and samples to plug into Sonic Producer. It’s simply not worth it for a beginner to drop a few hundred bucks on an expensive desktop program at first when they can get a beat maker, beat making lessons, community support, and the option of a full refund with Sonic Producer. If you’re looking to produce music, look no further than Sonic Producer.

Asymmetric Cryptography in Java

Author: admin  //  Category: byte

Security plays a significant role in our day to day life. So far software applications are concerned, security of data is required for authentication and for several validations. Normally while developing the applications, we use the concept of cryptography for password encryption and decryption. Some applications require more security, so they go for high end security system like trusted security certificates. The security mainly focuses on the integrity of the data at the several ends.

Technicalities For data security Java Cryptography provides a suitable framework to implement several kinds of cryptography. However there are basically two types of cryptography. Once is Symmetric Cryptography and Asymmetric Cryptography. When both the ends communicate the secured data with a common key for encryption and decryption, it is called the Symmetric Cryptography. In this case a shared key is used by both the parties to encrypt and decrypt the data. However there is a problem relating to exchange of key for symmetric cryptography. To overcome this problem java provides another approach for the cryptography called Asymmetric Cryptography. In case of Asymmetric cryptography, there will be two keys unlike one key in case of symmetric cryptography. One key is called Private key and other is called Public key. These two keys are generated together and can be used for encryption and decryption. In this case the Public key is used by anyone who wishes to communicate securely with the owner of the Private key. The Private key is used by the main owner and the owner gives the Public key so that they can decrypt the data. In this article I will give you the example on Asymmetric cryptography. You can find more tutorials and concept on Sun’s JCE(Java Cryptography Extension). In my next article, I will provide you the example on Symmetric cryptography.

Complete Example This example is only meant for learning and not for any specific use. You can take the piece of code to test in your system to learn the above concept.

The following class is used to create the Public key and Private key. This class contains generic methods to generate the Public and Private key. If you run the testharness class, you will find the two files called “Public.key” and “Private.key”. Please go through the java docs mentioned in the methods.

Class Name : – KeyCreator.java

package com.dds.security;

import java.io.FileOutputStream;

import java.io.IOException;

import java.security.KeyPair;

import java.security.KeyPairGenerator;

import java.security.PrivateKey;

import java.security.PublicKey;

/**This class is used to generate the Private and Public key file.

* The Public.key file and Private.key file will be generated in the

* current directory.

* @author Debadatta Mishra(PIKU)

*

*/

public class KeyCreator

{

/**

* Object of type {@link PublicKey}

*/

private PublicKey publicKey = null;

/**

* Object of type {@link PrivateKey}

*/

private PrivateKey privateKey = null;

/**Default constructor.

* Here KeyPair object is initialized and

* thereby public key and private key objects

* are created.

* @throws Exception

*/

public KeyCreator() throws Exception

{

super();

/*

* The following line is used to

* generate the Public and Private

* key.

*/

KeyPair keyPair = KeyPairGenerator

.getInstance(“RSA”)

.generateKeyPair();

publicKey = keyPair.getPublic();

privateKey = keyPair.getPrivate();

}

/**Method to return the {@link PublicKey}

* @return the {@link PublicKey}

*/

public PublicKey getPublicKey() {

return publicKey;

}

/**Method to return the {@link PrivateKey}

* @return the {@link PrivateKey}

*/

public PrivateKey getPrivateKey() {

return privateKey;

}

/**Method used to write the Public or Private

* key file.

* @param filename of type String indicating

* the name of Public or Private key

* @param contents of the key

*/

public void writeKey(String filename, byte[] contents)

{

try

{

FileOutputStream fos = new FileOutputStream(filename);

fos.write(contents);

fos.flush();

fos.close();

}

catch (IOException e)

{

e.printStackTrace();

}

}

}

The following class is used to read the “Public.key” and “Private.key” generated by the above program. If you are the owner you can have the “Private.key” file based upon which you have to encrypt the data and give your “Public.key” file to other end who wants to decrypt the data. In this following class, you can read both the “Public.key” and “Private.key” files.

Class Name:- KeyReader.java

package com.dds.security;

import java.io.ByteArrayOutputStream;

import java.io.FileInputStream;

import java.io.IOException;

import java.security.KeyFactory;

import java.security.PrivateKey;

import java.security.PublicKey;

import java.security.spec.PKCS8EncodedKeySpec;

import java.security.spec.X509EncodedKeySpec;

/**

* This class is used to read the Private and Public key

* files generated using the Java’s Asysmmetric Security

* system.

* @author Debadatta Mishra(PIKU)

*

*/

public class KeyReader

{

/**

* Object of type {@link KeyFactory}

*/

private KeyFactory keyFactory = null;

/**

* Default constructor to initialize the

* keyFactory.

*/

public KeyReader()

{

super();

try

{

keyFactory = KeyFactory.getInstance(“RSA”);

}

catch( Exception e )

{

e.printStackTrace();

}

}

/**This method is used to read the bytes from the file.

* The file can be a Public key file or a Private key

* file. In this file, you have stored the security key,

* based upon which encryption and decryption can be

* performed.

* @param fileName of type String indicating the file name

* @return the bytes from the file

* @throws Exception

*/

private byte[] getKeyData( String fileName ) throws Exception

{

FileInputStream fis = new FileInputStream(fileName);

ByteArrayOutputStream baos = new ByteArrayOutputStream();

int b;

try

{

while ((b = fis.read()) != -1)

{

baos.write(b);

}

fis.close();

baos.flush();

baos.close();

} catch (IOException e) {

e.printStackTrace();

}

return baos.toByteArray();

}

/**This method is used to return the object of type

* {@link PrivateKey}. In this method you have to pass

* the file name of the Private.key file.

* @param filename of type String indicating the

* file name.

* @return the object of type {@link PrivateKey}

* @throws Exception

*/

public PrivateKey getPrivateKey( String filename ) throws Exception

{

PrivateKey privateKey = null;

try

{

byte[] keydata = getKeyData(filename);

PKCS8EncodedKeySpec encodedPrivateKey = new PKCS8EncodedKeySpec(keydata);

privateKey = keyFactory.generatePrivate(encodedPrivateKey);

}

catch( Exception e )

{

e.printStackTrace();

}

return privateKey;

}

/**This method is used to return the object of type

* {@link PublicKey}. In this method you have to pass

* the file name of the Public.key file.

* @param filename of type String indicating the

* file name.

* @return the object of type {@link PublicKey}

* @throws Exception

*/

public PublicKey getPublicKey( String filename ) throws Exception

{

PublicKey publicKey = null;

try

{

byte[] keydata = getKeyData(filename);

X509EncodedKeySpec encodedPublicKey = new X509EncodedKeySpec(keydata);

publicKey = keyFactory.generatePublic(encodedPublicKey);

}

catch( Exception e )

{

e.printStackTrace();

}

return publicKey;

}

}

The following class is a utility class which is used to encrypt and decrypt the data.

ClassName :- SecurityUtil.java

package com.dds.security;

import java.security.PrivateKey;

import java.security.PublicKey;

import javax.crypto.Cipher;

/**This is a utility class to provide

* encryption and decryption based upon

* the key. The key can be your either

* Public or Private .

* @author Debadatta Mishra(PIKU)

*

*/

public class SecurityUtil

{

/**

* Object of type {@link Cipher}

*/

private static Cipher cipher = null;

/*

* The following static is used to

* initialize the Cipher object

*/

static

{

try

{

cipher = Cipher.getInstance(“RSA”);

}

catch( Exception e )

{

e.printStackTrace();

}

}

/**Method used to encrypt the string and return as bytes.

* Here the input parameter will be your Private key.

* You have to encrypt the string using your private

* key at your end.

* @param messsageBytes , it is the bytes from the

* string to encrypt

* @param privateKey of type {@link PrivateKey}

* @return encrypted bytes

* @throws Exception

*/

public static byte[] getEncryptedBytes( byte[] messsageBytes , PrivateKey privateKey) throws Exception

{

byte[] encryptedBytes = null;

cipher.init(Cipher.ENCRYPT_MODE , privateKey );

encryptedBytes = cipher.doFinal(messsageBytes);

return encryptedBytes;

}

/**Method used to decrypt the string and return as bytes.

* Here the input parameter will be your Public key.

* You have to decrypt the string using your Public

* key at the destination end.

* @param messsageBytes , it is the bytes from the

* string to encrypt

* @param publicKey of type {@link PublicKey}

* @return decrypted bytes

* @throws Exception

*/

public static byte[] getDecryptedBytes( byte[] messsageBytes , PublicKey publicKey)throws Exception

{

byte[] decryptedBytes = null;

cipher.init(Cipher.DECRYPT_MODE , publicKey );

decryptedBytes = cipher.doFinal( messsageBytes );

return decryptedBytes;

}

}

The following is test harness class to test the functionality of the above program. Please go through the comments and java docs of the above and below programs.

Class Name :- SecurityTestHarness.java

package com.security.testharness;

import java.security.PrivateKey;

import java.security.PublicKey;

import com.dds.security.KeyCreator;

import com.dds.security.KeyReader;

import com.dds.security.SecurityUtil;

/**This is a test harness class used to

* encrypt and decrypt the string based

* upon the Public and Private key.

* This class also helps to test how

* Public and Private key can be created.

* @author Debadatta Mishra(PIKU)

*

*/

public class SecurityTestHarness

{

public static void main(String[] args)

{

try

{

/*

* The following lines will generate the

* PublicKey and PrivateKey files.

*/

KeyCreator keyCreator = new KeyCreator();

PublicKey publicKey = keyCreator.getPublicKey();

PrivateKey privateKey = keyCreator.getPrivateKey();

/*

* Generate two files named Public.key and Private.key

*/

keyCreator.writeKey(“Public.key”, publicKey.getEncoded());

keyCreator.writeKey(“Private.key”, privateKey.getEncoded());

/*

* Get the public and private key

*/

KeyReader keyReader = new KeyReader();

PublicKey publicKey2 = keyReader.getPublicKey(“Public.key”);

System.out.println(“Public Key—-”+publicKey2);

PrivateKey privateKey2 = keyReader.getPrivateKey(“Private.key”);

System.out.println(“Private Key—-”+privateKey2);

String str = “Hi, Hello World, Welcome to the World of Java”;

byte[] stringBytes = str.getBytes();

byte[] encryptedBytes = SecurityUtil.getEncryptedBytes(

stringBytes, privateKey2);

String encryptedString = new String(encryptedBytes);

System.out.println(“EncryptedString—-”+encryptedString);

byte[] decryptedBytes = SecurityUtil.getDecryptedBytes(encryptedBytes, publicKey2);

System.out.println(“Decrypted String—-”+new String(decryptedBytes));

}

catch( Exception e )

{

e.printStackTrace();

}

}

}

To test the above programs, please create the appropriate package as mentioned in the program. You can also create your own package and modify the package name in the above programs. You can all the code in your favorable java editor.

Conclusion I hope that you will enjoy my article. If you find any problems or errors, please feel free to send me a mail in the address debadattamishra@aol.com . This article is only meant for those who are new to java development. This article does not bear any commercial significance. Please provide me the feedback about this article.

Incoming search terms:

Selling Spy Gadgets, The Three Steps To Making The Ultimate Surveillance Gadget Listing

Author: admin  //  Category: gadget online

Now that you have decided to sell spy gadgets and related security items it is vitally important that you list and advertise your product the correct way.

Not only for maximum sales potential but to also cover yourself from legal issues that sometimes arise when selling these types of items.

While selling surveillance and security items is still a legal “gray area” there are a few simple steps to take to protect yourself.

With the proper precautions selling spy gadgets online can become a very profitable outlet for your business.

Wording Your Listing

First of all, do some market research and define your target consumer base.

Once this is done, put the most critical and eye catching information in the header.

When wording your product description be certain to list all the features that particular item has to offer.

For example, in the case of a camera be sure to note its lens size, shutter speed, angle of view, etc.

Include the specifications such as dimensions, weight and any special features that it may perform (slow motion, night vision).

Mention its reliability and the legal uses that the product is intended for. Never refer to any kind of illegal activity in your product descriptions.

Try to relate an everyday situation involving your product.

Keep your descriptions short and concise, not wordy. People tend to lose interest if your sentences run on too long and become too descriptive. Keep it short and simple.

Hit the high points and stress how this particular item can benefit the perspective buyer. Include the price in your copy, this has two functions. It attracts the serious buyers while discouraging the casual consumer.

While embellishment is fine in traditional article writing, it can be disastrous in advertising. False claims may boost sales for a while but eventually your claims will be refuted.

Your credibility will come into question and you may even be sued for false advertising.

Get Great Photos

In advertising, images of some sort are a necessity. Include slick photos. Again, try to emphasize one of the features of the product. If your selling a compact camera photograph it in the palm of your hand to show how small it is.

Make the picture as descriptive as possible.

Always insert disclaimers at the end detailing sale “for intended use only”. Without these you are just inviting legal trouble.

With some planning and a little imagination you can create a product description that will win customers and increase profits.

Now you know how to make your listings irresistible to buyers get the spy gadgets that will sell. Visit Chinavasion.com or paste this URL into your browser: http://www.chinavasion.com/index.php/cName/electronic-gadgets/