Examples of publicKey()


Examples of com.google.gwt.chrome.crx.client.Extension.ManifestInfo.publicKey()

    final ManifestInfo spec = userType.getAnnotation(Extension.ManifestInfo.class);
    if (spec != null) {
      return new ExtensionArtifact(spec.name(), spec.description(),
          spec.version(), spec.permissions(), spec.updateUrl(),
          createIconResources(logger, context, userType, spec.icons()),
          spec.publicKey());
    }

    logger.log(TreeLogger.ERROR,
        "You need a @Extension.Specification annotation on "
            + userType.getQualifiedSourceName()
View Full Code Here

Examples of net.tomp2p.message.Message.publicKey()

        }
       
        if (putBuilder.changePublicKey()!=null) {
          message.key(putBuilder.locationKey());
          message.key(putBuilder.domainKey());
          message.publicKey(putBuilder.changePublicKey());
        } else {
          message.setDataMap(dataMap);
        }

        final FutureResponse futureResponse = new FutureResponse(message);
View Full Code Here

Examples of net.tomp2p.storage.Data.publicKey()

  public FuturePut changeProtectionKeyUnblocked(IParameters parameters) {
    logger.debug("Change content protection key. {}", parameters.toString());
    // create dummy object to change the protection key
    Data data = new Data().setProtectedEntry();
    // set new content protection keys
    data.publicKey(parameters.getNewProtectionKeys().getPublic());
    if (parameters.getTTL() != -1)
      data.ttlSeconds(parameters.getTTL());

    // // sign the data
    // try {
View Full Code Here

Examples of net.tomp2p.storage.Data.publicKey()

    // verify put
    Data retData = p1.get(lKey).setDomainKey(dKey).setContentKey(cKey).setVersionKey(vKey).start()
        .awaitUninterruptibly().getData();
    Assert.assertEquals("data1", (String) retData.object());
    Assert.assertEquals(keyPair1.getPublic(), retData.publicKey());
    // verify data signature
    Assert.assertTrue(retData.verify(keyPair1.getPublic(), factory));

    // change data signature to keys 2 using same data, sign with new key 2
    data = new Data("data1").ttlSeconds(ttl).setProtectedEntry().sign(keyPair2, factory);
View Full Code Here

Examples of net.tomp2p.storage.Data.publicKey()

    // verify change
    retData = p1.get(lKey).setDomainKey(dKey).setContentKey(cKey).setVersionKey(vKey).start()
        .awaitUninterruptibly().getData();
    Assert.assertEquals("data1", (String) retData.object());
    // verify new content protection keys 2
    Assert.assertEquals(keyPair2.getPublic(), retData.publicKey());
    // verify new data signature
    Assert.assertTrue(retData.verify(keyPair2.getPublic(), factory));

    // try overwrite with content protection key 1 and data signature (expected to fail)
    data = new Data("data2").setProtectedEntry();
View Full Code Here

Examples of net.tomp2p.storage.Data.publicKey()

    // verify that nothing changed
    retData = p1.get(lKey).setDomainKey(dKey).setContentKey(cKey).setVersionKey(vKey).start()
        .awaitUninterruptibly().getData();
    Assert.assertEquals("data1", (String) retData.object());
    Assert.assertEquals(keyPair2.getPublic(), retData.publicKey());
    // verify not changed signature
    Assert.assertTrue(retData.verify(keyPair2.getPublic(), factory));

    p1.shutdown().awaitUninterruptibly();
    p2.shutdown().awaitUninterruptibly();
View Full Code Here

Examples of net.tomp2p.storage.Data.publicKey()

    // verify put
    Data retData = p1.get(lKey).setDomainKey(dKey).setContentKey(cKey).setVersionKey(vKey).start()
        .awaitUninterruptibly().getData();
    Assert.assertEquals("data1", (String) retData.object());
    // verify content protection keys 1 is set
    Assert.assertEquals(keyPair1.getPublic(), retData.publicKey());
    // verify data signature
    Assert.assertTrue(retData.verify(keyPair1.getPublic(), factory));

    // create signature with keys 1 having the data object
    byte[] signature1 = factory.sign(keyPair1.getPrivate(), data.buffer()).encode();
View Full Code Here

Examples of net.tomp2p.storage.Data.publicKey()

    // verify change
    retData = p1.get(lKey).setDomainKey(dKey).setContentKey(cKey).setVersionKey(vKey).start()
        .awaitUninterruptibly().getData();
    Assert.assertEquals("data1", (String) retData.object());
    // verify change to content protection keys 2
    Assert.assertEquals(keyPair2.getPublic(), retData.publicKey());
    // verify new data signature
    Assert.assertTrue(retData.verify(keyPair2.getPublic(), factory));

    // try overwrite with content protection key 1 and data signature (exptected to fail)
    data = new Data("data2").setProtectedEntry();
View Full Code Here

Examples of net.tomp2p.storage.Data.publicKey()

    // verify that nothing changed
    retData = p1.get(lKey).setDomainKey(dKey).setContentKey(cKey).setVersionKey(vKey).start()
        .awaitUninterruptibly().getData();
    Assert.assertEquals("data1", (String) retData.object());
    Assert.assertEquals(keyPair2.getPublic(), retData.publicKey());
    // verify not changed signature
    Assert.assertTrue(retData.verify(keyPair2.getPublic(), factory));

    p1.shutdown().awaitUninterruptibly();
    p2.shutdown().awaitUninterruptibly();
View Full Code Here

Examples of net.tomp2p.storage.Data.publicKey()

    // verify put of version 1
    Data retData = p2.get(lKey).setDomainKey(dKey).setContentKey(cKey).setVersionKey(vKey1).start()
        .awaitUninterruptibly().getData();
    Assert.assertEquals("data1", (String) retData.object());
    // verify content protection keys 1 is set
    Assert.assertEquals(keyPair1.getPublic(), retData.publicKey());
   
    // try to overwrite version 1 without protection keys (expected to fail)
    Data data1A = new Data("data1A");
    FuturePut futurePut1A = p1.put(lKey).setData(cKey, data1A).setDomainKey(dKey).setVersionKey(vKey1)
        .start();
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.