com.ibm.security.krb5.internal.crypto
Class Des
- java.lang.Object
com.ibm.security.krb5.internal.crypto.Des
- public final class Des
- extends java.lang.Object
Constructor Summary
Constructor and Description |
---|
Des()
|
Method Summary
Modifier and Type | Method and Description |
---|---|
|
bad_key(byte[] key)
|
|
bad_key(long key)
|
|
cbc_encrypt(byte[] input,byte[] output,byte[] key,byte[] ivec,boolean encrypt)
Creates a DES cipher in Electronic Codebook mode, with no padding.
|
|
des_cksum(byte[] ivec,byte[] msg,byte[] key)
Encrypts the message blocks using DES CBC and output the
final block of 8-byte ciphertext.
|
|
long2octet(long input)
|
|
long2octet(long input,byte[] output)
|
|
long2octet(long input,byte[] output,int offset)
|
|
octet2long(byte[] input)
|
|
octet2long(byte[] input,int offset)
|
|
set_parity(byte[] key)
|
|
set_parity(byte[] key,int offset)
|
|
set_parity(long key)
|
|
string_to_key_bytes(java.lang.String str)
|
|
string_to_key(java.lang.String str)
Generates DES key from the password.
|
|
string2byte(java.lang.String str)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail
Des
- public Des()
Method Detail
set_parity
- public static final byte[] set_parity( byte[] key,
- int offset)
set_parity
- public static final byte[] set_parity( byte[] key)
set_parity
- public static final long set_parity( long key)
bad_key
- public static final boolean bad_key( long key)
bad_key
- public static final boolean bad_key( byte[] key)
octet2long
- public static long octet2long(byte[] input)
octet2long
- public static long octet2long(byte[] input,
- int offset)
long2octet
- public static byte[] long2octet( long input)
long2octet
- public static void long2octet(long input,
- byte[] output)
long2octet
- public static void long2octet(long input,
- byte[] output,
- int offset)
string2byte
- public static byte[] string2byte( java.lang.String str)
cbc_encrypt
- public static void cbc_encrypt( byte[] input,
- byte[] output,
- byte[] key,
- byte[] ivec,
- boolean encrypt)
- throws KrbCryptoException
Creates a DES cipher in Electronic Codebook mode, with no padding.
Parameters:
input
- plain text. output
- the buffer for the result. key
- DES the key to encrypt the text. ivec
- initialization vector. Throws:
string_to_key
- public static long string_to_key( java.lang.String str)
- throws KrbCryptoException
Generates DES key from the password.
des_cksum
- public static byte[] des_cksum( byte[] ivec,
- byte[] msg,
- byte[] key)
- throws KrbCryptoException
Encrypts the message blocks using DES CBC and output the
final block of 8-byte ciphertext.
Parameters:
ivec
- Initialization vector. msg
- Input message as an byte array. key
- DES key to encrypt the message. Returns:
the last block of ciphertext.
Throws:
string_to_key_bytes
- public static byte[] string_to_key_bytes( java.lang.String str)
- throws KrbCryptoException
Throws: