com.mindbright.util
public final class Crypto extends java.lang.Object
Constructor and Description |
---|
Crypto() |
Modifier and Type | Method and Description |
---|---|
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 SecureRandomAndPad |
getSecureRandomAndPad() |
static SecureRandomAndPad |
getSecureRandomAndPad(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) |
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
java.lang.ClassNotFoundException
java.lang.InstantiationException
java.lang.IllegalAccessException
public static void setFipsMode(boolean v)
public static boolean isFipsMode()
public static boolean hasUnlimitedStrengthJCE()
public static boolean hasUnlimitedDHSupport()
public static boolean hasECDHSupport()
public static boolean hasECDSASupport()
public static boolean hasCASTSupport()
public static SecureRandomAndPad getSecureRandomAndPad()
public static SecureRandomAndPad getSecureRandomAndPad(byte[] s)
public static java.security.SecureRandom getSecureRandom()
public static java.security.SecureRandom getSecureRandom(byte[] s)
public static java.security.MessageDigest getMessageDigest(java.lang.String alg) throws java.security.NoSuchAlgorithmException
java.security.NoSuchAlgorithmException
public static javax.crypto.Mac getMac(java.lang.String alg) throws java.security.NoSuchAlgorithmException
java.security.NoSuchAlgorithmException
public static javax.crypto.Cipher getCipher(java.lang.String alg) throws java.security.NoSuchAlgorithmException, javax.crypto.NoSuchPaddingException
java.security.NoSuchAlgorithmException
javax.crypto.NoSuchPaddingException
public static java.security.Signature getSignature(java.lang.String alg) throws java.security.NoSuchAlgorithmException
java.security.NoSuchAlgorithmException
public static java.security.KeyPairGenerator getKeyPairGenerator(java.lang.String alg) throws java.security.NoSuchAlgorithmException
java.security.NoSuchAlgorithmException
public static java.security.KeyFactory getKeyFactory(java.lang.String alg) throws java.security.NoSuchAlgorithmException
java.security.NoSuchAlgorithmException
public static javax.crypto.KeyAgreement getKeyAgreement(java.lang.String alg) throws java.security.NoSuchAlgorithmException
java.security.NoSuchAlgorithmException
public static java.lang.String getKeyName(javax.crypto.Cipher c)
public static void main(java.lang.String[] argv)