![JAR search and dependency download from the Maven repository](/logo.png)
nl.open.jwtdependency.org.bouncycastle.asn1.test.ObjectIdentifierTest Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of java-jwt-nodependencies Show documentation
Show all versions of java-jwt-nodependencies Show documentation
This is a drop in replacement for the auth0 java-jwt library (see https://github.com/auth0/java-jwt). This jar makes sure there are no external dependencies (e.g. fasterXml, Apacha Commons) needed. This is useful when deploying to an application server (e.g. tomcat with Alfreso or Pega).
The newest version!
package org.bouncycastle.asn1.test;
import org.bouncycastle.asn1.ASN1ObjectIdentifier;
import org.bouncycastle.util.test.SimpleTest;
import org.bouncycastle.util.test.TestResult;
public class ObjectIdentifierTest
extends SimpleTest
{
public String getName()
{
return "ObjectIdentifier";
}
public void performTest()
throws Exception
{
// exercise the object cache
for (int i = 0; i < 1024; i++)
{
for (int j = 0; j != 17000; j++)
{
byte[] encoded = new ASN1ObjectIdentifier("1.1." + i + "." + j).getEncoded();
ASN1ObjectIdentifier.getInstance(encoded);
}
}
}
public static void main(
String[] args)
{
ObjectIdentifierTest test = new ObjectIdentifierTest();
TestResult result = test.perform();
System.out.println(result);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy