diff options
author | Roberto Tyley <roberto.tyley@gmail.com> | 2014-07-15 01:38:01 +0400 |
---|---|---|
committer | Roberto Tyley <roberto.tyley@gmail.com> | 2014-07-26 11:23:17 +0400 |
commit | 7cb752aaf746dc0b473afeb9e892b7fbc12666c5 (patch) | |
tree | cc4f91ddc18332b5adbe82e3fcb040d976c90105 /prov/src/test/java/org/bouncycastle/jce/provider/test/JceTestUtil.java | |
parent | 551830f8ea5177042af2c7dd1fc90888bc67387d (diff) |
Execute become-spongy.sh
https://github.com/rtyley/spongycastle/blob/3040af/become-spongy.sh
Diffstat (limited to 'prov/src/test/java/org/bouncycastle/jce/provider/test/JceTestUtil.java')
-rw-r--r-- | prov/src/test/java/org/bouncycastle/jce/provider/test/JceTestUtil.java | 49 |
1 files changed, 0 insertions, 49 deletions
diff --git a/prov/src/test/java/org/bouncycastle/jce/provider/test/JceTestUtil.java b/prov/src/test/java/org/bouncycastle/jce/provider/test/JceTestUtil.java deleted file mode 100644 index 9c0805a8..00000000 --- a/prov/src/test/java/org/bouncycastle/jce/provider/test/JceTestUtil.java +++ /dev/null @@ -1,49 +0,0 @@ -package org.bouncycastle.jce.provider.test; - -import java.security.Security; -import java.util.ArrayList; -import java.util.Enumeration; -import java.util.List; - -import org.bouncycastle.jce.provider.BouncyCastleProvider; - -abstract class JceTestUtil -{ - private JceTestUtil() - { - } - - static String[] getRegisteredAlgorithms(String prefix, String[] exclusionPatterns) - { - final BouncyCastleProvider prov = (BouncyCastleProvider)Security.getProvider("BC"); - - List matches = new ArrayList(); - Enumeration algos = prov.keys(); - while (algos.hasMoreElements()) - { - String algo = (String)algos.nextElement(); - if (!algo.startsWith(prefix)) - { - continue; - } - String algoName = algo.substring(prefix.length()); - if (!isExcluded(algoName, exclusionPatterns)) - { - matches.add(algoName); - } - } - return (String[])matches.toArray(new String[matches.size()]); - } - - private static boolean isExcluded(String algoName, String[] exclusionPatterns) - { - for (int i = 0; i < exclusionPatterns.length; i++) - { - if (algoName.contains(exclusionPatterns[i])) - { - return true; - } - } - return false; - } -} |