- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中org.bouncycastle.asn1.x9.X962Parameters
类的一些代码示例,展示了X962Parameters
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。X962Parameters
类的具体详情如下:
包路径:org.bouncycastle.asn1.x9.X962Parameters
类名称:X962Parameters
[英]The Parameters ASN.1 CHOICE from X9.62.
[中]参数为ASN。1个X9选项。62
代码示例来源:origin: redfish64/TinyTravelTracker
public static X962Parameters getInstance(
Object obj)
{
if (obj == null || obj instanceof X962Parameters)
{
return (X962Parameters)obj;
}
if (obj instanceof ASN1Primitive)
{
return new X962Parameters((ASN1Primitive)obj);
}
throw new IllegalArgumentException("unknown object in getInstance()");
}
代码示例来源:origin: org.bouncycastle/bcprov-debug-jdk15on
@Override
protected void engineInit(byte[] bytes, String format)
throws IOException
{
if (isASN1FormatString(format))
{
X962Parameters params = X962Parameters.getInstance(bytes);
ECCurve curve = EC5Util.getCurve(BouncyCastleProvider.CONFIGURATION, params);
if (params.isNamedCurve())
{
ASN1ObjectIdentifier curveId = ASN1ObjectIdentifier.getInstance(params.getParameters());
curveName = ECNamedCurveTable.getName(curveId);
if (curveName == null)
{
curveName = curveId.getId();
}
}
ecParameterSpec = EC5Util.convertToSpec(params, curve);
}
else
{
throw new IOException("Unknown encoded parameters format in AlgorithmParameters object: " + format);
}
}
代码示例来源:origin: org.bouncycastle/bcprov-debug-jdk15on
@Override
protected byte[] engineGetEncoded(String format)
throws IOException
{
if (isASN1FormatString(format))
{
X962Parameters params;
if (ecParameterSpec == null) // implicitly CA
{
params = new X962Parameters(DERNull.INSTANCE);
}
else if (curveName != null)
{
params = new X962Parameters(ECUtil.getNamedCurveOid(curveName));
}
else
{
org.bouncycastle.jce.spec.ECParameterSpec ecSpec = EC5Util.convertSpec(ecParameterSpec, false);
X9ECParameters ecP = new X9ECParameters(
ecSpec.getCurve(),
ecSpec.getG(),
ecSpec.getN(),
ecSpec.getH(),
ecSpec.getSeed());
params = new X962Parameters(ecP);
}
return params.getEncoded();
}
throw new IOException("Unknown parameters format in AlgorithmParameters object: " + format);
}
代码示例来源:origin: org.bouncycastle/bcprov-debug-jdk15on
Set acceptableCurves = configuration.getAcceptableNamedCurves();
if (params.isNamedCurve())
ASN1ObjectIdentifier oid = ASN1ObjectIdentifier.getInstance(params.getParameters());
else if (params.isImplicitlyCA())
X9ECParameters ecP = X9ECParameters.getInstance(params.getParameters());
代码示例来源:origin: org.bouncycastle/bcprov-debug-jdk15on
X962Parameters params = X962Parameters.getInstance(info.getPrivateKeyAlgorithm().getParameters());
X9ECParameters curveParams;
if (params.isNamedCurve())
ASN1ObjectIdentifier oid = ASN1ObjectIdentifier.getInstance(params.getParameters());
else if (params.isImplicitlyCA())
params = new X962Parameters(curveParams);
代码示例来源:origin: redfish64/TinyTravelTracker
X962Parameters params = new X962Parameters((ASN1Primitive)algId.getParameters());
if (params.isNamedCurve())
ASN1ObjectIdentifier oid = (ASN1ObjectIdentifier)params.getParameters();
x9 = X9ECParameters.getInstance(params.getParameters());
dParams = new ECDomainParameters(
x9.getCurve(), x9.getG(), x9.getN(), x9.getH(), x9.getSeed());
代码示例来源:origin: org.bouncycastle/bcprov-debug-jdk15on
params = new X962Parameters(curveOid);
params = new X962Parameters(DERNull.INSTANCE);
ecSpec.getCurve().getSeed());
params = new X962Parameters(ecP);
info = new PrivateKeyInfo(new AlgorithmIdentifier(CryptoProObjectIdentifiers.gostR3410_2001, params.toASN1Primitive()), keyStructure.toASN1Primitive());
info = new PrivateKeyInfo(new AlgorithmIdentifier(X9ObjectIdentifiers.id_ecPublicKey, params.toASN1Primitive()), keyStructure.toASN1Primitive());
代码示例来源:origin: org.bouncycastle/bcprov-debug-jdk15on
public static X962Parameters getInstance(
ASN1TaggedObject obj,
boolean explicit)
{
return getInstance(obj.getObject()); // must be explicitly tagged
}
代码示例来源:origin: org.bouncycastle/bcprov-debug-jdk15on
X962Parameters params = X962Parameters.getInstance(info.getAlgorithm().getParameters());
X9ECParameters curveParams;
if (params.isNamedCurve())
ASN1ObjectIdentifier oid = ASN1ObjectIdentifier.getInstance(params.getParameters());
else if (params.isImplicitlyCA())
params = new X962Parameters(curveParams);
代码示例来源:origin: com.hynnet/jradius-extended
X962Parameters params = new X962Parameters((DERObject)keyInfo.getAlgorithmId().getParameters());
ECDomainParameters dParams = null;
if (params.isNamedCurve())
DERObjectIdentifier oid = (DERObjectIdentifier)params.getParameters();
X9ECParameters ecP = X962NamedCurves.getByOID(oid);
(ASN1Sequence)params.getParameters());
dParams = new ECDomainParameters(
ecP.getCurve(),
代码示例来源:origin: org.bouncycastle/bcprov-debug-jdk15on
public static ECDomainParameters getDomainParameters(
ProviderConfiguration configuration,
X962Parameters params)
{
ECDomainParameters domainParameters;
if (params.isNamedCurve())
{
ASN1ObjectIdentifier oid = ASN1ObjectIdentifier.getInstance(params.getParameters());
X9ECParameters ecP = ECUtil.getNamedCurveByOid(oid);
if (ecP == null)
{
Map extraCurves = configuration.getAdditionalECParameters();
ecP = (X9ECParameters)extraCurves.get(oid);
}
domainParameters = new ECNamedDomainParameters(oid, ecP.getCurve(), ecP.getG(), ecP.getN(), ecP.getH(), ecP.getSeed());
}
else if (params.isImplicitlyCA())
{
org.bouncycastle.jce.spec.ECParameterSpec iSpec = configuration.getEcImplicitlyCa();
domainParameters = new ECDomainParameters(iSpec.getCurve(), iSpec.getG(), iSpec.getN(), iSpec.getH(), iSpec.getSeed());
}
else
{
X9ECParameters ecP = X9ECParameters.getInstance(params.getParameters());
domainParameters = new ECDomainParameters(ecP.getCurve(), ecP.getG(), ecP.getN(), ecP.getH(), ecP.getSeed());
}
return domainParameters;
}
代码示例来源:origin: org.bouncycastle/bcprov-debug-jdk15on
params = new X962Parameters(curveOid);
orderBitLength = ECUtil.getOrderBitLength(BouncyCastleProvider.CONFIGURATION, ecSpec.getOrder(), this.getS());
params = new X962Parameters(DERNull.INSTANCE);
orderBitLength = ECUtil.getOrderBitLength(BouncyCastleProvider.CONFIGURATION, null, this.getS());
ecSpec.getCurve().getSeed());
params = new X962Parameters(ecP);
orderBitLength = ECUtil.getOrderBitLength(BouncyCastleProvider.CONFIGURATION, ecSpec.getOrder(), this.getS());
info = new PrivateKeyInfo(new AlgorithmIdentifier(UAObjectIdentifiers.dstu4145be, params.toASN1Primitive()), keyStructure.toASN1Primitive());
info = new PrivateKeyInfo(new AlgorithmIdentifier(X9ObjectIdentifiers.id_ecPublicKey, params.toASN1Primitive()), keyStructure.toASN1Primitive());
代码示例来源:origin: redfish64/TinyTravelTracker
public static X962Parameters getInstance(
ASN1TaggedObject obj,
boolean explicit)
{
return getInstance(obj.getObject()); // must be explicitly tagged
}
代码示例来源:origin: org.bouncycastle/bcprov-debug-jdk15on
AsymmetricKeyParameter getPublicKeyParameters(SubjectPublicKeyInfo keyInfo, Object defaultParams)
X962Parameters params = X962Parameters.getInstance(keyInfo.getAlgorithm().getParameters());
ECDomainParameters dParams;
if (params.isNamedCurve())
ASN1ObjectIdentifier oid = (ASN1ObjectIdentifier)params.getParameters();
oid, x9.getCurve(), x9.getG(), x9.getN(), x9.getH(), x9.getSeed());
else if (params.isImplicitlyCA())
X9ECParameters x9 = X9ECParameters.getInstance(params.getParameters());
dParams = new ECDomainParameters(
x9.getCurve(), x9.getG(), x9.getN(), x9.getH(), x9.getSeed());
代码示例来源:origin: net.jradius/jradius-extended
X962Parameters params = new X962Parameters((DERObject)keyInfo.getAlgorithmId().getParameters());
ECDomainParameters dParams = null;
if (params.isNamedCurve())
DERObjectIdentifier oid = (DERObjectIdentifier)params.getParameters();
X9ECParameters ecP = X962NamedCurves.getByOID(oid);
(ASN1Sequence)params.getParameters());
dParams = new ECDomainParameters(
ecP.getCurve(),
代码示例来源:origin: coova/jradius
X962Parameters params = X962Parameters.getInstance(keyInfo.getPrivateKeyAlgorithm().getParameters());
ECDomainParameters dParams = null;
if (params.isNamedCurve())
ASN1ObjectIdentifier oid = (ASN1ObjectIdentifier) params.getParameters();
X9ECParameters ecP = X962NamedCurves.getByOID(oid);
X9ECParameters ecP = X9ECParameters.getInstance(params.getParameters());
dParams = new ECDomainParameters(
ecP.getCurve(),
代码示例来源:origin: org.bouncycastle/bcprov-debug-jdk15on
EllipticCurve ellipticCurve;
if (params.isNamedCurve())
ASN1ObjectIdentifier oid = (ASN1ObjectIdentifier)params.getParameters();
X9ECParameters ecP = ECUtil.getNamedCurveByOid(oid);
if (ecP == null)
ecP.getH());
else if (params.isImplicitlyCA())
X9ECParameters ecP = X9ECParameters.getInstance(params.getParameters());
代码示例来源:origin: org.bouncycastle/bcprov-debug-jdk15on
public static X962Parameters getInstance(
Object obj)
{
if (obj == null || obj instanceof X962Parameters)
{
return (X962Parameters)obj;
}
if (obj instanceof ASN1Primitive)
{
return new X962Parameters((ASN1Primitive)obj);
}
if (obj instanceof byte[])
{
try
{
return new X962Parameters(ASN1Primitive.fromByteArray((byte[])obj));
}
catch (Exception e)
{
throw new IllegalArgumentException("unable to parse encoded data: " + e.getMessage());
}
}
throw new IllegalArgumentException("unknown object in getInstance()");
}
代码示例来源:origin: org.bouncycastle/bcprov-debug-jdk15on
params = new X962Parameters(curveOid);
orderBitLength = ECUtil.getOrderBitLength(BouncyCastleProvider.CONFIGURATION, ecSpec.getOrder(), this.getS());
params = new X962Parameters(DERNull.INSTANCE);
orderBitLength = ECUtil.getOrderBitLength(BouncyCastleProvider.CONFIGURATION, null, this.getS());
ecSpec.getCurve().getSeed());
params = new X962Parameters(ecP);
orderBitLength = ECUtil.getOrderBitLength(BouncyCastleProvider.CONFIGURATION, ecSpec.getOrder(), this.getS());
info = new PrivateKeyInfo(new AlgorithmIdentifier(identifier, params.toASN1Primitive()), keyStructure.toASN1Primitive());
代码示例来源:origin: org.xipki.tk/security
public static ECPublicKey createECPublicKey(final byte[] encodedAlgorithmIdParameters,
final byte[] encodedPoint)
throws InvalidKeySpecException {
ParamUtil.requireNonNull("encodedAlgorithmIdParameters", encodedAlgorithmIdParameters);
ParamUtil.requireNonNull("encodedPoint", encodedPoint);
ASN1Encodable algParams;
if (encodedAlgorithmIdParameters[0] == 6) {
algParams = ASN1ObjectIdentifier.getInstance(encodedAlgorithmIdParameters);
} else {
algParams = X962Parameters.getInstance(encodedAlgorithmIdParameters);
}
AlgorithmIdentifier algId = new AlgorithmIdentifier(
X9ObjectIdentifiers.id_ecPublicKey, algParams);
SubjectPublicKeyInfo spki = new SubjectPublicKeyInfo(algId, encodedPoint);
X509EncodedKeySpec keySpec;
try {
keySpec = new X509EncodedKeySpec(spki.getEncoded());
} catch (IOException ex) {
throw new InvalidKeySpecException(ex.getMessage(), ex);
}
KeyFactory kf;
try {
kf = KeyFactory.getInstance("EC", "BC");
} catch (NoSuchAlgorithmException | NoSuchProviderException ex) {
throw new InvalidKeySpecException(ex.getMessage(), ex);
}
return (ECPublicKey) kf.generatePublic(keySpec);
}
问题故障解决记录 -- Java RMI Connection refused to host: x.x.x.x .... 在学习JavaRMI时,我遇到了以下情况 问题原因:可
我正在玩 Rank-N-type 并尝试输入 x x .但我发现这两个函数可以以相同的方式输入,这很不直观。 f :: (forall a b. a -> b) -> c f x = x x g ::
这个问题已经有答案了: How do you compare two version Strings in Java? (31 个回答) 已关闭 8 年前。 有谁知道如何在Java中比较两个版本字符串
这个问题已经有答案了: How do the post increment (i++) and pre increment (++i) operators work in Java? (14 个回答)
下面是带有 -n 和 -r 选项的 netstat 命令的输出,其中目标字段显示压缩地址 (127.1/16)。我想知道 netstat 命令是否有任何方法或选项可以显示整个目标 IP (127.1.
我知道要证明 : (¬ ∀ x, p x) → (∃ x, ¬ p x) 证明是: theorem : (¬ ∀ x, p x) → (∃ x, ¬ p x) := begin intro n
x * x 如何通过将其存储在“auto 变量”中来更改?我认为它应该仍然是相同的,并且我的测试表明类型、大小和值显然都是相同的。 但即使 x * x == (xx = x * x) 也是错误的。什么
假设,我们这样表达: someIQueryable.Where(x => x.SomeBoolProperty) someIQueryable.Where(x => !x.SomeBoolProper
我有一个字符串 1234X5678 我使用这个正则表达式来匹配模式 .X|..X|X. 我得到了 34X 问题是为什么我没有得到 4X 或 X5? 为什么正则表达式选择执行第二种模式? 最佳答案 这里
我的一个 friend 在面试时遇到了这个问题 找到使该函数返回真值的 x 值 function f(x) { return (x++ !== x) && (x++ === x); } 面试官
这个问题在这里已经有了答案: 10年前关闭。 Possible Duplicate: Isn't it easier to work with foo when it is represented b
我是 android 的新手,我一直在练习开发一个针对 2.2 版本的应用程序,我需要帮助了解如何将我的应用程序扩展到其他版本,即 1.x、2.3.x、3 .x 和 4.x.x,以及一些针对屏幕分辨率
为什么案例 1 给我们 :error: TypeError: x is undefined on line... //case 1 var x; x.push(x); console.log(x);
代码优先: # CASE 01 def test1(x): x += x print x l = [100] test1(l) print l CASE01 输出: [100, 100
我正在努力温习我的大计算。如果我有将所有项目移至 'i' 2 个空格右侧的函数,我有一个如下所示的公式: (n -1) + (n - 2) + (n - 3) ... (n - n) 第一次迭代我必须
给定 IP 字符串(如 x.x.x.x/x),我如何或将如何计算 IP 的范围最常见的情况可能是 198.162.1.1/24但可以是任何东西,因为法律允许的任何东西。 我要带198.162.1.1/
在我作为初学者努力编写干净的 Javascript 代码时,我最近阅读了 this article当我偶然发现这一段时,关于 JavaScript 中的命名空间: The code at the ve
我正在编写一个脚本,我希望避免污染 DOM 的其余部分,它将是一个用于收集一些基本访问者分析数据的第 3 方脚本。 我通常使用以下内容创建一个伪“命名空间”: var x = x || {}; 我正在
我尝试运行我的test_container_services.py套件,但遇到了以下问题: docker.errors.APIError:500服务器错误:内部服务器错误(“ b'{” message
是否存在这两个 if 语句会产生不同结果的情况? if(x as X != null) { // Do something } if(x is X) { // Do something } 编
我是一名优秀的程序员,十分优秀!