本文整理了Java中org.spongycastle.asn1.ASN1Integer.<init>()
方法的一些代码示例,展示了ASN1Integer.<init>()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ASN1Integer.<init>()
方法的具体详情如下:
包路径:org.spongycastle.asn1.ASN1Integer
类名称:ASN1Integer
方法名:<init>
[英]Construct an INTEGER from the passed in long value.
[中]从传入的长值构造一个整数。
代码示例来源:origin: com.madgag.spongycastle/core
public TimeStampedData(DERIA5String dataUri, MetaData metaData, ASN1OctetString content, Evidence temporalEvidence)
{
this.version = new ASN1Integer(1);
this.dataUri = dataUri;
this.metaData = metaData;
this.content = content;
this.temporalEvidence = temporalEvidence;
}
代码示例来源:origin: com.madgag.spongycastle/core
private PKIHeaderBuilder(
ASN1Integer pvno,
GeneralName sender,
GeneralName recipient)
{
this.pvno = pvno;
this.sender = sender;
this.recipient = recipient;
}
代码示例来源:origin: com.madgag.spongycastle/core
public EncryptedData(EncryptedContentInfo encInfo, ASN1Set unprotectedAttrs)
{
this.version = new ASN1Integer((unprotectedAttrs == null) ? 0 : 2);
this.encryptedContentInfo = encInfo;
this.unprotectedAttrs = unprotectedAttrs;
}
代码示例来源:origin: com.madgag.spongycastle/core
public PasswordRecipientInfo(
AlgorithmIdentifier keyDerivationAlgorithm,
AlgorithmIdentifier keyEncryptionAlgorithm,
ASN1OctetString encryptedKey)
{
this.version = new ASN1Integer(0);
this.keyDerivationAlgorithm = keyDerivationAlgorithm;
this.keyEncryptionAlgorithm = keyEncryptionAlgorithm;
this.encryptedKey = encryptedKey;
}
代码示例来源:origin: com.madgag.spongycastle/core
public GOST3410ParamSetParameters(
int keySize,
BigInteger p,
BigInteger q,
BigInteger a)
{
this.keySize = keySize;
this.p = new ASN1Integer(p);
this.q = new ASN1Integer(q);
this.a = new ASN1Integer(a);
}
代码示例来源:origin: com.madgag.spongycastle/core
/**
* Constructor for elliptic curves over prime fields
* <code>F<sub>2</sub></code>.
* @param primeP The prime <code>p</code> defining the prime field.
*/
public X9FieldID(BigInteger primeP)
{
this.id = prime_field;
this.parameters = new ASN1Integer(primeP);
}
代码示例来源:origin: com.madgag.spongycastle/core
public SPHINCS256KeyParams(AlgorithmIdentifier treeDigest)
{
this.version = new ASN1Integer(0);
this.treeDigest = treeDigest;
}
代码示例来源:origin: com.madgag.spongycastle/core
public ASN1Primitive toASN1Primitive()
{
return new ASN1Integer(id);
}
}
代码示例来源:origin: com.madgag.spongycastle/core
/**
* create a cA=true object for the given path length constraint.
*
* @param pathLenConstraint
*/
public BasicConstraints(
int pathLenConstraint)
{
this.cA = ASN1Boolean.getInstance(true);
this.pathLenConstraint = new ASN1Integer(pathLenConstraint);
}
代码示例来源:origin: com.madgag.spongycastle/core
public ValidationParams(byte[] seed, int pgenCounter)
{
if (seed == null)
{
throw new IllegalArgumentException("'seed' cannot be null");
}
this.seed = new DERBitString(seed);
this.pgenCounter = new ASN1Integer(pgenCounter);
}
代码示例来源:origin: com.madgag.spongycastle/core
public RainbowPublicKey(int docLength, short[][] coeffQuadratic, short[][] coeffSingular, short[] coeffScalar)
{
this.version = new ASN1Integer(0);
this.docLength = new ASN1Integer(docLength);
this.coeffQuadratic = RainbowUtil.convertArray(coeffQuadratic);
this.coeffSingular = RainbowUtil.convertArray(coeffSingular);
this.coeffScalar = RainbowUtil.convertArray(coeffScalar);
}
代码示例来源:origin: com.madgag.spongycastle/core
public ASN1Primitive toASN1Primitive()
{
ASN1EncodableVector v = new ASN1EncodableVector();
// encode <n>
v.add(new ASN1Integer(n));
// encode <t>
v.add(new ASN1Integer(t));
// encode <matrixG>
v.add(new DEROctetString(g.getEncoded()));
return new DERSequence(v);
}
代码示例来源:origin: com.madgag.spongycastle/core
public ASN1Primitive toASN1Primitive()
{
ASN1EncodableVector v = new ASN1EncodableVector();
v.add(new ASN1Integer(0));
v.add(data);
return new BERSequence(v);
}
}
代码示例来源:origin: com.madgag.spongycastle/core
public PublishTrustAnchors(BigInteger seqNumber, AlgorithmIdentifier hashAlgorithm, byte[][] anchorHashes)
{
this.seqNumber = new ASN1Integer(seqNumber);
this.hashAlgorithm = hashAlgorithm;
ASN1EncodableVector v = new ASN1EncodableVector();
for (int i = 0; i != anchorHashes.length; i++)
{
v.add(new DEROctetString(Arrays.clone(anchorHashes[i])));
}
this.anchorHashes = new DERSequence(v);
}
代码示例来源:origin: com.madgag.spongycastle/core
public RainbowPrivateKey(short[][] invA1, short[] b1, short[][] invA2,
short[] b2, int[] vi, Layer[] layers)
{
this.version = new ASN1Integer(1);
this.invA1 = RainbowUtil.convertArray(invA1);
this.b1 = RainbowUtil.convertArray(b1);
this.invA2 = RainbowUtil.convertArray(invA2);
this.b2 = RainbowUtil.convertArray(b2);
this.vi = RainbowUtil.convertIntArray(vi);
this.layers = layers;
}
代码示例来源:origin: com.madgag.spongycastle/core
public ASN1Primitive toASN1Primitive()
{
ASN1EncodableVector v = new ASN1EncodableVector();
v.add(new DEROctetString(nonce));
if (icvLen != 12)
{
v.add(new ASN1Integer(icvLen));
}
return new DERSequence(v);
}
}
代码示例来源:origin: com.madgag.spongycastle/core
public ASN1Primitive toASN1Primitive()
{
ASN1EncodableVector v = new ASN1EncodableVector();
v.add(version);
v.add(new ASN1Integer(height));
v.add(treeDigest);
return new DERSequence(v);
}
}
代码示例来源:origin: com.madgag.spongycastle/core
public ASN1Primitive toASN1Primitive()
{
ASN1EncodableVector v = new ASN1EncodableVector();
v.add(new ASN1Integer(keySize));
v.add(p);
v.add(q);
v.add(a);
return new DERSequence(v);
}
}
代码示例来源:origin: com.madgag.spongycastle/core
public ASN1Primitive toASN1Primitive()
{
ASN1EncodableVector v = new ASN1EncodableVector();
v.add(new ASN1Integer(0)); // version
v.add(new DEROctetString(publicSeed));
v.add(new DEROctetString(root));
return new DERSequence(v);
}
}
代码示例来源:origin: com.madgag.spongycastle/prov
/**
* Return a PKCS8 representation of the key. The sequence returned
* represents a full PrivateKeyInfo object.
*
* @return a PKCS8 representation of the key.
*/
public byte[] getEncoded()
{
return KeyUtil.getEncodedPrivateKeyInfo(new AlgorithmIdentifier(X9ObjectIdentifiers.id_dsa, new DSAParameter(dsaSpec.getP(), dsaSpec.getQ(), dsaSpec.getG()).toASN1Primitive()), new ASN1Integer(getX()));
}
内容来源于网络,如有侵权,请联系作者删除!