Examples of OBJECT_IDENTIFIER


Examples of org.mozilla.jss.asn1.OBJECT_IDENTIFIER

    SEQUENCE privateKeyInfo = new SEQUENCE();
    privateKeyInfo.addElement(new INTEGER(0));

    SEQUENCE algid = new SEQUENCE();
    algid.addElement(new OBJECT_IDENTIFIER("1.2.840.10045.2.1"));
    algid.addElement(new OBJECT_IDENTIFIER(EcCore.getOID(params)));
    privateKeyInfo.addElement(algid);

    SEQUENCE ecPrivateKey = new SEQUENCE();
    ecPrivateKey.addElement(new INTEGER(1));
    ecPrivateKey
View Full Code Here

Examples of org.mozilla.jss.asn1.OBJECT_IDENTIFIER

  @Override
  public byte[] getEncoded() {
    SEQUENCE outer = new SEQUENCE();

    SEQUENCE algid = new SEQUENCE();
    algid.addElement(new OBJECT_IDENTIFIER("1.2.840.10045.2.1"));
    algid.addElement(new OBJECT_IDENTIFIER(EcCore.getOID(params)));
    outer.addElement(algid);

    BIT_STRING ecPublivKey = new BIT_STRING(EcCore.ecPointToBytes(getW(),
        params), 0);
    outer.addElement(ecPublivKey);
View Full Code Here

Examples of org.mozilla.jss.asn1.OBJECT_IDENTIFIER

  // "Translate" e.g. {1 2 840 10045 2 1} to 1.2.840.10045.2.1
  private static String decodeOID(ASN1Value val) throws Exception {
    OBJECT_IDENTIFIER.Template ot = new OBJECT_IDENTIFIER.Template();
    ByteArrayOutputStream baos = new ByteArrayOutputStream();
    val.encode(baos);
    OBJECT_IDENTIFIER o = (OBJECT_IDENTIFIER) ot
        .decode(new ByteArrayInputStream(baos.toByteArray()));
    StringBuffer sb = new StringBuffer();
    long[] nums = o.getNumbers();
    for (int i = 0; i < nums.length - 1; i++) {
      sb.append(nums[i] + ".");
    }
    sb.append(nums[nums.length - 1]);
    return sb.toString();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.