sun.security.mule.krb5.internal.crypto
Class Des3

java.lang.Object
  extended by sun.security.mule.krb5.internal.crypto.Des3

public class Des3
extends Object

Class with static methods for doing Triple DES operations.


Method Summary
static byte[] calculateChecksum(byte[] baseKey, int usage, byte[] input, int start, int len)
           
static byte[] decrypt(byte[] baseKey, int usage, byte[] ivec, byte[] ciphertext, int start, int len)
           
static byte[] decryptRaw(byte[] baseKey, int usage, byte[] ivec, byte[] ciphertext, int start, int len)
          Decrypt ciphertext; do not remove confounder, padding, or check checksum
static byte[] encrypt(byte[] baseKey, int usage, byte[] ivec, byte[] plaintext, int start, int len)
           
static byte[] encryptRaw(byte[] baseKey, int usage, byte[] ivec, byte[] plaintext, int start, int len)
           
static int getChecksumLength()
           
static byte[] parityFix(byte[] value)
           
static byte[] stringToKey(char[] chars)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

stringToKey

public static byte[] stringToKey(char[] chars)
                          throws GeneralSecurityException
Throws:
GeneralSecurityException

parityFix

public static byte[] parityFix(byte[] value)
                        throws GeneralSecurityException
Throws:
GeneralSecurityException

getChecksumLength

public static int getChecksumLength()

calculateChecksum

public static byte[] calculateChecksum(byte[] baseKey,
                                       int usage,
                                       byte[] input,
                                       int start,
                                       int len)
                                throws GeneralSecurityException
Throws:
GeneralSecurityException

encrypt

public static byte[] encrypt(byte[] baseKey,
                             int usage,
                             byte[] ivec,
                             byte[] plaintext,
                             int start,
                             int len)
                      throws GeneralSecurityException,
                             KrbCryptoException
Throws:
GeneralSecurityException
KrbCryptoException

encryptRaw

public static byte[] encryptRaw(byte[] baseKey,
                                int usage,
                                byte[] ivec,
                                byte[] plaintext,
                                int start,
                                int len)
                         throws GeneralSecurityException,
                                KrbCryptoException
Throws:
GeneralSecurityException
KrbCryptoException

decrypt

public static byte[] decrypt(byte[] baseKey,
                             int usage,
                             byte[] ivec,
                             byte[] ciphertext,
                             int start,
                             int len)
                      throws GeneralSecurityException
Throws:
GeneralSecurityException

decryptRaw

public static byte[] decryptRaw(byte[] baseKey,
                                int usage,
                                byte[] ivec,
                                byte[] ciphertext,
                                int start,
                                int len)
                         throws GeneralSecurityException
Decrypt ciphertext; do not remove confounder, padding, or check checksum

Throws:
GeneralSecurityException


Copyright © 2013. All Rights Reserved.