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

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

public class ArcFourHmac
extends Object

Class with static methods for doing RC4-HMAC operations.

Author:
Seema Malkani

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, byte[] seqNum)
           
static byte[] decryptSeq(byte[] baseKey, int usage, byte[] checksum, byte[] ciphertext, int start, int len)
           
static byte[] encrypt(byte[] baseKey, int usage, byte[] ivec, byte[] plaintext, int start, int len)
           
static byte[] encryptRaw(byte[] baseKey, int usage, byte[] seqNum, byte[] plaintext, int start, int len)
           
static byte[] encryptSeq(byte[] baseKey, int usage, byte[] checksum, byte[] plaintext, int start, int len)
           
static int getChecksumLength()
           
static byte[] stringToKey(char[] password)
           
 
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[] password)
                          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

encryptSeq

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

decryptSeq

public static byte[] decryptSeq(byte[] baseKey,
                                int usage,
                                byte[] checksum,
                                byte[] ciphertext,
                                int start,
                                int len)
                         throws GeneralSecurityException,
                                KrbCryptoException
Throws:
GeneralSecurityException
KrbCryptoException

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[] seqNum,
                                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,
                                byte[] seqNum)
                         throws GeneralSecurityException
Throws:
GeneralSecurityException


Copyright © 2013. All Rights Reserved.