Documentation of 'org.mapdb.EncryptionXTEA' Java class
EncryptionXTEA
org.mapdb

Class EncryptionXTEA



  • public final class EncryptionXTEA
    extends java.lang.Object

    An implementation of the EncryptionXTEA block cipher algorithm.

    This implementation uses 32 rounds. The best attack reported as of 2009 is 36 rounds (Wikipedia).

    It requires 32 byte long encryption key, so SHA256 password hash is used.

    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static int ALIGN
      Blocks sizes are always multiples of this number.
    • Constructor Summary

      Constructors 
      Constructor and Description
      EncryptionXTEA(byte[] password) 
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void decrypt(byte[] bytes, int off, int len) 
      void encrypt(byte[] bytes, int off, int len) 
      static byte[] getHash(byte[] data)
      Calculate the SHA256 hash code for the given data.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • ALIGN

        public static final int ALIGN
        Blocks sizes are always multiples of this number.
        See Also:
        Constant Field Values
    • Constructor Detail

      • EncryptionXTEA

        public EncryptionXTEA(byte[] password)
    • Method Detail

      • encrypt

        public void encrypt(byte[] bytes,
                            int off,
                            int len)
      • decrypt

        public void decrypt(byte[] bytes,
                            int off,
                            int len)
      • getHash

        public static byte[] getHash(byte[] data)
        Calculate the SHA256 hash code for the given data. Used to hash password.
        Parameters:
        data - the data to hash
        Returns:
        the hash code

DataMelt 3.0 © DataMelt by jWork.ORG

Ads help maintain this website.