SupportWriter space ↗
REFERENCE LIBRARY

References from other publishers

Republished articles with source attribution. This collection is separate from Diary Coding’s original guides and does not display ads.

Read original guides → · Editorial policy

FOR YOUR CURIOSITY

Latest notes.

AWT / NOTES</>↗
AWT17 Apr 2009

How do I get screen’s display mode information?

This example shows graphics devices display mode information such as the display width, height, refresh-rate and bit-depth. This information can be obtained from GraphicsDevice.getDisplayMode() method which return an instance of java.awt.DisplayMode. We can also get the size of a screen using the following example How do I get my screen size?, but this example can […]

Wayan · 1 min read
AWT / NOTES</>↗
AWT14 Apr 2009

How do I get number of available screens?

This code shows how to get number of available screen devices on the local machine or local graphics environment. We obtain the number of screens by getting the length of array returned by GraphicsEnvironment.getScreenDevices() method. This process can produce a HeadlessException to happen if we try to run this code on a machine that doesn’t […]

Wayan · 1 min read
JASYPT / NOTES</>↗
Jasypt13 Apr 2009

How do I validate user’s password with PasswordEncryptor?

Every application that you’ll create may require an authentication process. This authentication process will at least contains a process of checking user’s login name and their password. To make the system reliable the password we usually stored the password in an encrypted form. The BasicPasswordEncryptor which implements the PasswordEncryptor interface provide a BasicPasswordEncryptor.encryptPassword(String password) method […]

Wayan · 2 min read
JASYPT / NOTES</>↗
Jasypt12 Apr 2009

How do I create a message digest?

Creating a digest of a string message can be easily done using the general digester class Digester. First we need to get an instance of Digester, we call the class constructor and pass SHA-1 as the algorithm. After having a Digester instance we create the message digest by executing or calling the Digester.digest(byte[] binary) method […]

Wayan · 1 min read
JASYPT / NOTES</>↗
Jasypt10 Apr 2009

How do I encrypt or decrypt bytes information using StandardPBEByteEncryptor?

This code demonstrate how to use the StandardPBEByteEncryptor class to encrypt and decrypt bytes information. package org.kodejava.jasypt; import org.jasypt.encryption.pbe.StandardPBEByteEncryptor; import java.util.Arrays; public class ByteEncryptorDemo { public static void main(String[] args) { String text = "The quick brown fox jumps over the lazy dog"; System.out.println("Text = " + Arrays.toString(text.getBytes())); StandardPBEByteEncryptor encryptor = new StandardPBEByte...

Wayan · 1 min read
✳

Knowledge grows when shared.

Stay curious. There is always something new to learn.

Explore notes ↗
Putu Adi Guna Permana
ABOUT THE AUTHOR

Dr (C). Ir. Putu Adi Guna Permana, S.Kom., M.Kom., IPM., ASEAN Eng.

Writer and founder of Diary Coding — sharing notes, tutorials, and experiences about programming for anyone who wants to keep learning.