IT. Expert System.

Android Reference

DESKeySpec


javax.crypto.spec

Class DESKeySpec

  • All Implemented Interfaces:
    KeySpec


    public class DESKeySpec
    extends Object
    implements KeySpec
    The key specification for a DES key.
    • Field Summary

      Fields
      Modifier and Type Field and Description
      static int DES_KEY_LEN
      The length of a DES key in bytes.
    • Constructor Summary

      Constructors
      Constructor and Description
      DESKeySpec(byte[] key)
      Creates a new DESKeySpec from the first 8 bytes of the specified key data.
      DESKeySpec(byte[] key, int offset)
      Creates a new DESKeySpec from the first 8 bytes of the specified key data starting at offset.
    • Field Detail

      • DES_KEY_LEN

        public static final int DES_KEY_LEN
        The length of a DES key in bytes.
        See Also:
        Constant Field Values
    • Constructor Detail

      • DESKeySpec

        public DESKeySpec(byte[] key)
                   throws InvalidKeyException
        Creates a new DESKeySpec from the first 8 bytes of the specified key data.
        Parameters:
        key - the key data.
        Throws:
        InvalidKeyException - if the length of the specified key data is less than 8.
      • DESKeySpec

        public DESKeySpec(byte[] key,
                  int offset)
                   throws InvalidKeyException
        Creates a new DESKeySpec from the first 8 bytes of the specified key data starting at offset.
        Parameters:
        key - the key data
        offset - the offset to start at.
        Throws:
        InvalidKeyException - if the length of the specified key data starting at offset is less than 8.
    • Method Detail

      • getKey

        public byte[] getKey()
        Returns a copy of the key.
        Returns:
        a copy of the key.
      • isParityAdjusted

        public static boolean isParityAdjusted(byte[] key,
                               int offset)
                                        throws InvalidKeyException
        Returns whether the specified key data starting at offset is parity-adjusted.
        Parameters:
        key - the key data.
        offset - the offset to start checking at.
        Returns:
        true if the specified key data is parity-adjusted, false otherwise.
        Throws:
        InvalidKeyException - if the length of the key data starting at offset is less than 8, or the key is null.
      • isWeak

        public static boolean isWeak(byte[] key,
                     int offset)
                              throws InvalidKeyException
        Returns whether the specified key data starting at offset is weak or semi-weak.
        Parameters:
        key - the key data.
        offset - the offset to start checking at.
        Returns:
        true if the specified key data is weak or semi-weak.
        Throws:
        InvalidKeyException - if the length of the key data starting at offset is less than 8, or it is null.


Content

Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)

SQL

HTML

PHP

CSS

Java Script

MYSQL

JQUERY

VBS

REGEX

C

C++

C#

Design patterns

RFC (standard status)

RFC (proposed standard status)

RFC (draft standard status)

RFC (informational status)

RFC (experimental status)

RFC (best current practice status)

RFC (historic status)

RFC (unknown status)

IT dictionary

License.
All information of this service is derived from the free sources and is provided solely in the form of quotations. This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 676 / 158670904. Delta: 0.03291 с