Core Java
-
Create direct and non-direct ByteBuffer
In this example we are going to demonstrate several methods of creating a direct (memory-mapped) and non-direct ByteBuffer in Java.…
Read More » -
Convert between ByteBuffer and byte array
With this example we are going to demonstrate how to convert between ByteBuffers and byte arrays. In short, to make…
Read More » -
Export Object over RMI example
This is an example of how to Export Object over RMI. The Java Remote Method Invocation (RMI) system allows an…
Read More » -
Encrypt/Decrypt a file using DES
In this example we shall show you how to encrypt/decrypt a file using DES. To encrypt and decrypt a file…
Read More » -
Calculate the CRC Sum of a file
With this example we are going to demonstrate how to calculate the CRC Sum of a file. The Cyclic Redundancy…
Read More » -
Encrypt/Decrypt with salt
This is an example of how to encrypt and decrypt using a salt. The salt is random data very often…
Read More » -
Check message consistency using hash functions
In this example we shall show you how to check message consistency using hash functions. We are using the java.security.MessageDigest…
Read More » -
SHA-1 hash function example
With this example we are going to demonstrate how to make a SHA-1 hash function example. The Secure Hash Algorithm…
Read More » -
Diffie-Helman key pair generation and parameters
This is an example of how to generate key pairs with the Diffie-Helman algorithm. The DH algorithm is be used…
Read More » -
Simple symmetric key encrypt/decrypt
In this example we shall show you how to encrypt and decrypt using a symmetric key. In the case of…
Read More »