NIH | National Cancer Institute | NCI Wiki  

Error rendering macro 'rw-search'

null

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Reverted from v. 1

Password Encryption

...

Creating a Cipher Object

...

cipher.init(<MODE>, <KEY>, <PBEParameterSpec>);
A Cipher object obtained via getInstance must be initialized for one of four modes, which are defined as final integer constants in the Cipher class. The modes can be referenced by their symbolic names, which are shown below along with a description of the purpose of each mode:

  • ENCRYPT_MODE: Encryption of data.
  • DECRYPT_MODE: Decryption of data.
  • WRAP_MODE: Wrapping a Key into bytes so that the key can be securely transported.
  • UNWRAP_MODE: Unwrapping of a previously wrapped key into a java.security.Key object.

...