本文整理汇总了Java中org.bouncycastle.asn1.gnu.GNUObjectIdentifiers类的典型用法代码示例。如果您正苦于以下问题:Java GNUObjectIdentifiers类的具体用法?Java GNUObjectIdentifiers怎么用?Java GNUObjectIdentifiers使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
GNUObjectIdentifiers类属于org.bouncycastle.asn1.gnu包,在下文中一共展示了GNUObjectIdentifiers类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getAlgorithm
import org.bouncycastle.asn1.gnu.GNUObjectIdentifiers; //导入依赖的package包/类
protected static String getAlgorithm(String algDetails)
{
if (algDetails.indexOf('[') > 0)
{
return algDetails.substring(0, algDetails.indexOf('['));
}
if (algDetails.startsWith(NISTObjectIdentifiers.aes.getId()))
{
return "AES";
}
if (algDetails.startsWith(GNUObjectIdentifiers.Serpent.getId()))
{
return "Serpent";
}
String name = (String)nameTable.get(Strings.toUpperCase(algDetails));
if (name != null)
{
return name;
}
return algDetails;
}
示例2: configure
import org.bouncycastle.asn1.gnu.GNUObjectIdentifiers; //导入依赖的package包/类
public void configure(ConfigurableProvider provider)
{
provider.addAlgorithm("Cipher.Serpent", PREFIX + "$ECB");
provider.addAlgorithm("KeyGenerator.Serpent", PREFIX + "$KeyGen");
provider.addAlgorithm("AlgorithmParameters.Serpent", PREFIX + "$AlgParams");
provider.addAlgorithm("Cipher.Tnepres", PREFIX + "$TECB");
provider.addAlgorithm("KeyGenerator.Tnepres", PREFIX + "$TKeyGen");
provider.addAlgorithm("AlgorithmParameters.Tnepres", PREFIX + "$TAlgParams");
provider.addAlgorithm("Cipher", GNUObjectIdentifiers.Serpent_128_ECB, PREFIX + "$ECB");
provider.addAlgorithm("Cipher", GNUObjectIdentifiers.Serpent_192_ECB, PREFIX + "$ECB");
provider.addAlgorithm("Cipher", GNUObjectIdentifiers.Serpent_256_ECB, PREFIX + "$ECB");
provider.addAlgorithm("Cipher", GNUObjectIdentifiers.Serpent_128_CBC, PREFIX + "$CBC");
provider.addAlgorithm("Cipher", GNUObjectIdentifiers.Serpent_192_CBC, PREFIX + "$CBC");
provider.addAlgorithm("Cipher", GNUObjectIdentifiers.Serpent_256_CBC, PREFIX + "$CBC");
provider.addAlgorithm("Cipher", GNUObjectIdentifiers.Serpent_128_CFB, PREFIX + "$CFB");
provider.addAlgorithm("Cipher", GNUObjectIdentifiers.Serpent_192_CFB, PREFIX + "$CFB");
provider.addAlgorithm("Cipher", GNUObjectIdentifiers.Serpent_256_CFB, PREFIX + "$CFB");
provider.addAlgorithm("Cipher", GNUObjectIdentifiers.Serpent_128_OFB, PREFIX + "$OFB");
provider.addAlgorithm("Cipher", GNUObjectIdentifiers.Serpent_192_OFB, PREFIX + "$OFB");
provider.addAlgorithm("Cipher", GNUObjectIdentifiers.Serpent_256_OFB, PREFIX + "$OFB");
addGMacAlgorithm(provider, "SERPENT", PREFIX + "$SerpentGMAC", PREFIX + "$KeyGen");
addGMacAlgorithm(provider, "TNEPRES", PREFIX + "$TSerpentGMAC", PREFIX + "$TKeyGen");
addPoly1305Algorithm(provider, "SERPENT", PREFIX + "$Poly1305", PREFIX + "$Poly1305KeyGen");
}