Examples of publicKey()


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

        }
      }
      SortedMap<Number640, Data> result = backend.remove(from, to, true);
      for (Map.Entry<Number640, Data> entry : result.entrySet()) {
        Data data = entry.getValue();
        if (data.publicKey() == null || data.publicKey().equals(publicKey)) {
          backend.removeTimeout(entry.getKey());
        }
      }
      return result;
    } finally {
View Full Code Here

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

        }
      }
      SortedMap<Number640, Data> result = backend.remove(from, to, true);
      for (Map.Entry<Number640, Data> entry : result.entrySet()) {
        Data data = entry.getValue();
        if (data.publicKey() == null || data.publicKey().equals(publicKey)) {
          backend.removeTimeout(entry.getKey());
        }
      }
      return result;
    } finally {
View Full Code Here

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

      }

      final Data data = backend.get(key);
      boolean changed = false;
      if (data!=null && newData.publicKey() != null) {
        data.publicKey(newData.publicKey());
        changed = true;
      }
      if (data!=null && newData.isSigned()) {
        data.signature(newData.signature());
        changed = true;
View Full Code Here

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

    Data oldDataUnverified = findOld(key, peerAddress, dataMapUnverified);
    boolean isUnverified = false;
    boolean isVerified = false;
    if(oldDataUnverified != null) {
      //security check
      if (oldDataUnverified.publicKey()!=null && !oldDataUnverified.publicKey().equals(publicKey)) {
        return false;
      }
      isUnverified = true;
    } else {
      Data oldData = findOld(key, peerAddress, dataMap);
View Full Code Here

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

    Data oldDataUnverified = findOld(key, peerAddress, dataMapUnverified);
    boolean isUnverified = false;
    boolean isVerified = false;
    if(oldDataUnverified != null) {
      //security check
      if (oldDataUnverified.publicKey()!=null && !oldDataUnverified.publicKey().equals(publicKey)) {
        return false;
      }
      isUnverified = true;
    } else {
      Data oldData = findOld(key, peerAddress, dataMap);
View Full Code Here

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

      isUnverified = true;
    } else {
      Data oldData = findOld(key, peerAddress, dataMap);
      if(oldData != null) {
        //security check
        if (oldData.publicKey()!=null && !oldData.publicKey().equals(publicKey)) {
          return false;
        }
        isVerified = true;
      }
    }
View Full Code Here

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

      isUnverified = true;
    } else {
      Data oldData = findOld(key, peerAddress, dataMap);
      if(oldData != null) {
        //security check
        if (oldData.publicKey()!=null && !oldData.publicKey().equals(publicKey)) {
          return false;
        }
        isVerified = true;
      }
    }
View Full Code Here

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

      FutureDigest futureDigest = p1.digest(lKey).returnMetaValues().start();
      futureDigest.awaitUninterruptibly();
      Assert.assertTrue(futureDigest.isSuccess());
      Data dataMeta = futureDigest.digest().dataMap().values().iterator().next();

      Assert.assertEquals(keyPair1.getPublic(), dataMeta.publicKey());
      Assert.assertEquals(data.signature(), dataMeta.signature());
      Assert.assertEquals(0, dataMeta.length());
    } finally {
      p1.shutdown().awaitUninterruptibly();
      p2.shutdown().awaitUninterruptibly();
View Full Code Here

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

        Assert.assertTrue(fp1.isSuccess());
        FuturePut fp2 = p2.put(Number160.createHash("key1")).data(data).start().awaitUninterruptibly();
        Assert.assertTrue(!fp2.isSuccess());
       
        Data data2 = new Data().protectEntry(keyPair2);
        data2.publicKey(keyPair2.getPublic());
        FuturePut fp3 = p1.put(Number160.createHash("key1")).sign().putMeta().data(data2).start().awaitUninterruptibly();
        Assert.assertTrue(fp3.isSuccess());
       
        FuturePut fp4 = p2.put(Number160.createHash("key1")).sign().data(data).start().awaitUninterruptibly();
        Assert.assertTrue(fp4.isSuccess());  
View Full Code Here

Examples of org.jose4j.keys.EcKeyUtil.publicKey()

        BigInteger x = getBigIntFromBase64UrlEncodedParam(params, X_MEMBER_NAME);

        BigInteger y =  getBigIntFromBase64UrlEncodedParam(params, Y_MEMBER_NAME);

        EcKeyUtil keyUtil = new EcKeyUtil();
        key = keyUtil.publicKey(x, y, curve);
        checkForBareKeyCertMismatch();

        if (params.containsKey(PRIVATE_KEY_MEMBER_NAME))
        {
            BigInteger d = getBigIntFromBase64UrlEncodedParam(params, PRIVATE_KEY_MEMBER_NAME);
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.