List/Grid crypto Subscribe RSS feed of category crypto

java-logo

Get bytes of generated symmetric key

package com.javacodegeeks.snippets.core;import java.security.NoSuchAlgorithmException;import javax.crypto.KeyGenerator; import javax.crypto.SecretKey; import javax.crypto.spec.SecretKeySpec;public ...
java-logo

Generate Message Authentication Code (MAC)

package com.javacodegeeks.snippets.core;import java.io.UnsupportedEncodingException; import java.security.InvalidKeyException; import java.security.NoSuchAlgorithmException;import ...
java-logo

Encrypt/Decrypt file/stream with DES

This is an example of how to encrypt or decrypt a file or stream with DES. DES in computing refers to the Data Encryption Standard and is supported by Java. To encrypt or decrypt a ...
java-logo

List available Encryption/Decryption algorithms

package com.javacodegeeks.snippets.core;import java.security.Provider; import java.security.Security; import java.util.Iterator; import java.util.Set; import java.util.TreeSet;public ...
java-logo

List available cryptographic services

package com.javacodegeeks.snippets.core;import java.security.Provider; import java.security.Security; import java.util.Iterator; import java.util.Set; import java.util.TreeSet;public ...
java-logo

Encrypt/Decrypt with DES using pass phrase

package com.javacodegeeks.snippets.core;import java.security.InvalidAlgorithmParameterException; import java.security.InvalidKeyException; import java.security.NoSuchAlgorithmException; import ...
java-logo

Encrypt/Decrypt object with DES

package com.javacodegeeks.snippets.core;import java.io.IOException; import java.io.Serializable; import java.security.InvalidKeyException; import java.security.NoSuchAlgorithmException;import ...
java-logo

Encrypt/Decrypt string with DES

package com.javacodegeeks.snippets.core;import java.security.InvalidKeyException; import java.security.NoSuchAlgorithmException;import javax.crypto.Cipher; import javax.crypto.KeyGenerator; import ...
© 2010-2012 Examples Java Code Geeks. Licenced under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
All trademarks and registered trademarks appearing on Examples Java Code Geeks are the property of their respective owners.
Java is a trademark or registered trademark of Oracle Corporation in the United States and other countries.
Examples Java Code Geeks is not connected to Oracle Corporation and is not sponsored by Oracle Corporation.