DESedeKeySpec
open class DESedeKeySpec : KeySpec
| kotlin.Any | |
| ↳ | javax.crypto.spec.DESedeKeySpec | 
This class specifies a DES-EDE ("triple-DES") key.
Summary
| Constants | |
|---|---|
| static Int | 
            
             The constant which defines the length of a DESede key in bytes.  | 
        
| Public constructors | |
|---|---|
            DESedeKeySpec(key: ByteArray!)Creates a DESedeKeySpec object using the first 24 bytes in   | 
        |
            DESedeKeySpec(key: ByteArray!, offset: Int)Creates a DESedeKeySpec object using the first 24 bytes in   | 
        |
| Public methods | |
|---|---|
| open ByteArray! | 
            getKey()Returns the DES-EDE key.  | 
        
| open static Boolean | 
            isParityAdjusted(key: ByteArray!, offset: Int)Checks if the given DES-EDE key, starting at   | 
        
Constants
DES_EDE_KEY_LEN
static val DES_EDE_KEY_LEN: Int
The constant which defines the length of a DESede key in bytes.
Value: 24Public constructors
DESedeKeySpec
DESedeKeySpec(key: ByteArray!)
Creates a DESedeKeySpec object using the first 24 bytes in key as the key material for the DES-EDE key. 
 The bytes that constitute the DES-EDE key are those between key[0] and key[23] inclusive
| Parameters | |
|---|---|
key | 
            ByteArray!: the buffer with the DES-EDE key material. The first 24 bytes of the buffer are copied to protect against subsequent modification. | 
| Exceptions | |
|---|---|
java.lang.NullPointerException | 
            if key is null. | 
          
java.security.InvalidKeyException | 
            if the given key material is shorter than 24 bytes. | 
DESedeKeySpec
DESedeKeySpec(
key: ByteArray!,
offset: Int)
Creates a DESedeKeySpec object using the first 24 bytes in key, beginning at offset inclusive, as the key material for the DES-EDE key. 
 The bytes that constitute the DES-EDE key are those between key[offset] and key[offset+23] inclusive.
| Parameters | |
|---|---|
key | 
            ByteArray!: the buffer with the DES-EDE key material. The first 24 bytes of the buffer beginning at offset inclusive are copied to protect against subsequent modification. | 
          
offset | 
            Int: the offset in key, where the DES-EDE key material starts. | 
          
| Exceptions | |
|---|---|
java.lang.NullPointerException | 
            if key is null. | 
          
java.security.InvalidKeyException | 
            if the given key material, starting at offset inclusive, is shorter than 24 bytes | 
          
Public methods
getKey
open fun getKey(): ByteArray!
Returns the DES-EDE key.
| Return | |
|---|---|
ByteArray! | 
            the DES-EDE key. Returns a new array each time this method is called. | 
isParityAdjusted
open static fun isParityAdjusted(
key: ByteArray!,
offset: Int
): Boolean
Checks if the given DES-EDE key, starting at offset inclusive, is parity-adjusted.
| Parameters | |
|---|---|
key | 
            ByteArray!: a byte array which holds the key value | 
offset | 
            Int: the offset into the byte array | 
| Return | |
|---|---|
Boolean | 
            true if the given DES-EDE key is parity-adjusted, false otherwise | 
| Exceptions | |
|---|---|
java.lang.NullPointerException | 
            if key is null. | 
          
java.security.InvalidKeyException | 
            if the given key material, starting at offset inclusive, is shorter than 24 bytes |