Share via


DESKeySpec Constructors

Definition

Overloads

DESKeySpec(Byte[])

Creates a DESKeySpec object using the first 8 bytes in key as the key material for the DES key.

DESKeySpec(Byte[], Int32)

Creates a DESKeySpec object using the first 8 bytes in key, beginning at offset inclusive, as the key material for the DES key.

DESKeySpec(IntPtr, JniHandleOwnership)

A constructor used when creating managed representations of JNI objects; called by the runtime.

DESKeySpec(Byte[])

Creates a DESKeySpec object using the first 8 bytes in key as the key material for the DES key.

[Android.Runtime.Register(".ctor", "([B)V", "")]
public DESKeySpec (byte[]? key);
[<Android.Runtime.Register(".ctor", "([B)V", "")>]
new Javax.Crypto.Spec.DESKeySpec : byte[] -> Javax.Crypto.Spec.DESKeySpec

Parameters

key
Byte[]

the buffer with the DES key material. The first 8 bytes of the buffer are copied to protect against subsequent modification.

Attributes

Exceptions

if the length of the specified key data is less than 8.

Remarks

Creates a DESKeySpec object using the first 8 bytes in key as the key material for the DES key.

The bytes that constitute the DES key are those between key[0] and key[7] inclusive.

Java documentation for javax.crypto.spec.DESKeySpec.DESKeySpec(byte[]).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

DESKeySpec(Byte[], Int32)

Creates a DESKeySpec object using the first 8 bytes in key, beginning at offset inclusive, as the key material for the DES key.

[Android.Runtime.Register(".ctor", "([BI)V", "")]
public DESKeySpec (byte[]? key, int offset);
[<Android.Runtime.Register(".ctor", "([BI)V", "")>]
new Javax.Crypto.Spec.DESKeySpec : byte[] * int -> Javax.Crypto.Spec.DESKeySpec

Parameters

key
Byte[]

the buffer with the DES key material. The first 8 bytes of the buffer beginning at offset inclusive are copied to protect against subsequent modification.

offset
Int32

the offset in key, where the DES key material starts.

Attributes

Exceptions

if the length of the specified key data starting at offset is less than 8.

Remarks

Creates a DESKeySpec object using the first 8 bytes in key, beginning at offset inclusive, as the key material for the DES key.

The bytes that constitute the DES key are those between key[offset] and key[offset+7] inclusive.

Java documentation for javax.crypto.spec.DESKeySpec.DESKeySpec(byte[], int).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

DESKeySpec(IntPtr, JniHandleOwnership)

A constructor used when creating managed representations of JNI objects; called by the runtime.

protected DESKeySpec (IntPtr javaReference, Android.Runtime.JniHandleOwnership transfer);
new Javax.Crypto.Spec.DESKeySpec : nativeint * Android.Runtime.JniHandleOwnership -> Javax.Crypto.Spec.DESKeySpec

Parameters

javaReference
IntPtr

nativeint

A IntPtrcontaining a Java Native Interface (JNI) object reference.

transfer
JniHandleOwnership

A JniHandleOwnershipindicating how to handle javaReference

Remarks

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to