com.mindbright.util
Class Crypto

java.lang.Object
  extended by com.mindbright.util.Crypto

public final class Crypto
extends java.lang.Object


Constructor Summary
Crypto()
           
 
Method Summary
static javax.crypto.Cipher getCipher(java.lang.String alg)
           
static javax.crypto.KeyAgreement getKeyAgreement(java.lang.String alg)
           
static java.security.KeyFactory getKeyFactory(java.lang.String alg)
           
static java.lang.String getKeyName(javax.crypto.Cipher c)
           
static java.security.KeyPairGenerator getKeyPairGenerator(java.lang.String alg)
           
static javax.crypto.Mac getMac(java.lang.String alg)
           
static java.security.MessageDigest getMessageDigest(java.lang.String alg)
           
static java.security.SecureRandom getSecureRandom()
           
static java.security.SecureRandom getSecureRandom(byte[] s)
           
static java.security.Signature getSignature(java.lang.String alg)
           
static boolean hasCASTSupport()
           
static boolean hasECDHSupport()
           
static boolean hasECDSASupport()
           
static boolean hasUnlimitedDHSupport()
           
static boolean hasUnlimitedStrengthJCE()
           
static boolean isFipsMode()
           
static void main(java.lang.String[] argv)
           
static void setFipsMode(boolean v)
           
static void setProvider(java.lang.String prov, java.lang.String preferredprov, boolean useonlypreferredprov, java.lang.String prng, boolean debug)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Crypto

public Crypto()
Method Detail

setProvider

public static void setProvider(java.lang.String prov,
                               java.lang.String preferredprov,
                               boolean useonlypreferredprov,
                               java.lang.String prng,
                               boolean debug)
                        throws java.lang.ClassNotFoundException,
                               java.lang.InstantiationException,
                               java.lang.IllegalAccessException
Throws:
java.lang.ClassNotFoundException
java.lang.InstantiationException
java.lang.IllegalAccessException

setFipsMode

public static void setFipsMode(boolean v)

isFipsMode

public static boolean isFipsMode()

hasUnlimitedStrengthJCE

public static boolean hasUnlimitedStrengthJCE()

hasUnlimitedDHSupport

public static boolean hasUnlimitedDHSupport()

hasECDHSupport

public static boolean hasECDHSupport()

hasECDSASupport

public static boolean hasECDSASupport()

hasCASTSupport

public static boolean hasCASTSupport()

getSecureRandom

public static java.security.SecureRandom getSecureRandom()

getSecureRandom

public static java.security.SecureRandom getSecureRandom(byte[] s)

getMessageDigest

public static java.security.MessageDigest getMessageDigest(java.lang.String alg)
                                                    throws java.security.NoSuchAlgorithmException
Throws:
java.security.NoSuchAlgorithmException

getMac

public static javax.crypto.Mac getMac(java.lang.String alg)
                               throws java.security.NoSuchAlgorithmException
Throws:
java.security.NoSuchAlgorithmException

getCipher

public static javax.crypto.Cipher getCipher(java.lang.String alg)
                                     throws java.security.NoSuchAlgorithmException,
                                            javax.crypto.NoSuchPaddingException
Throws:
java.security.NoSuchAlgorithmException
javax.crypto.NoSuchPaddingException

getSignature

public static java.security.Signature getSignature(java.lang.String alg)
                                            throws java.security.NoSuchAlgorithmException
Throws:
java.security.NoSuchAlgorithmException

getKeyPairGenerator

public static java.security.KeyPairGenerator getKeyPairGenerator(java.lang.String alg)
                                                          throws java.security.NoSuchAlgorithmException
Throws:
java.security.NoSuchAlgorithmException

getKeyFactory

public static java.security.KeyFactory getKeyFactory(java.lang.String alg)
                                              throws java.security.NoSuchAlgorithmException
Throws:
java.security.NoSuchAlgorithmException

getKeyAgreement

public static javax.crypto.KeyAgreement getKeyAgreement(java.lang.String alg)
                                                 throws java.security.NoSuchAlgorithmException
Throws:
java.security.NoSuchAlgorithmException

getKeyName

public static java.lang.String getKeyName(javax.crypto.Cipher c)

main

public static void main(java.lang.String[] argv)