IT. Expert System.

Android Reference

SecretKeySpec


javax.crypto.spec

Class SecretKeySpec

    • Constructor Summary

      Constructors
      Constructor and Description
      SecretKeySpec(byte[] key, int offset, int len, String algorithm)
      Creates a new SecretKeySpec for the key data from the specified buffer key starting at offset with length len and the specified algorithm name.
      SecretKeySpec(byte[] key, String algorithm)
      Creates a new SecretKeySpec for the specified key data and algorithm name.
    • Constructor Detail

      • SecretKeySpec

        public SecretKeySpec(byte[] key,
                     String algorithm)
        Creates a new SecretKeySpec for the specified key data and algorithm name.
        Parameters:
        key - the key data.
        algorithm - the algorithm name.
        Throws:
        IllegalArgumentException - if the key data or the algorithm name is null or if the key data is empty.
      • SecretKeySpec

        public SecretKeySpec(byte[] key,
                     int offset,
                     int len,
                     String algorithm)
        Creates a new SecretKeySpec for the key data from the specified buffer key starting at offset with length len and the specified algorithm name.
        Parameters:
        key - the key data.
        offset - the offset.
        len - the size of the key data.
        algorithm - the algorithm name.
        Throws:
        IllegalArgumentException - if the key data or the algorithm name is null, the key data is empty or offset and len do not specify a valid chunk in the buffer key.
        ArrayIndexOutOfBoundsException - if offset or len is negative.
    • Method Detail

      • getAlgorithm

        public String getAlgorithm()
        Returns the algorithm name.
        Specified by:
        getAlgorithm in interface Key
        Returns:
        the algorithm name.
      • getFormat

        public String getFormat()
        Returns the name of the format used to encode the key.
        Specified by:
        getFormat in interface Key
        Returns:
        the format name "RAW".
      • getEncoded

        public byte[] getEncoded()
        Returns the encoded form of this secret key.
        Specified by:
        getEncoded in interface Key
        Returns:
        the encoded form of this secret key.
      • equals

        public boolean equals(Object obj)
        Compares the specified object with this SecretKeySpec instance.
        Overrides:
        equals in class Object
        Parameters:
        obj - the object to compare.
        Returns:
        true if the algorithm name and key of both object are equal, otherwise false.
        See Also:
        Object.hashCode()


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: 660 / 158670888. Delta: 0.09787 с