Examples of buildData()


Examples of com.google.k2crypto.Key.buildData()

      throws StoreException {
    assertFalse(driver.isEmpty());
    Key loaded = driver.load();
    assertEquals(
        expected.buildData().build().toByteString(),
        loaded.buildData().build().toByteString());   
  }

  /**
   * Checks that the driver can correctly load, save and erase keys with a
   * simple test sequence. The driver must implement both {@link ReadableDriver}
View Full Code Here

Examples of com.google.k2crypto.Key.buildData()

    // Quickly save it (the native driver recognizes file:// addresses)
    storage.save(NATIVE_STORE.toURI(), original);
   
    // Quickly load it back
    Key loaded = storage.load(NATIVE_STORE.toURI());
    assert(original.buildData().build().equals(loaded.buildData().build()));
   
    // Use Store API for more elaborate operations
    Store store = null;
    try {
      // Open a SQLite database store
View Full Code Here

Examples of com.google.k2crypto.Key.buildData()

      store.save(loaded);
     
      // Check store is not empty and load key back
      if (!store.isEmpty()) {
        Key sameKey = store.load();
        assert(loaded.buildData().build().equals(sameKey.buildData().build()));
      }
     
    } finally {
      // Close store
      if (store != null) {
View Full Code Here

Examples of com.google.k2crypto.keyversions.KeyVersion.buildData()

    builder.setCore(getCore());
    List<KeyVersion> keyVersions = this.keyVersions;
    final int size = keyVersions.size();
    for (int i = 0; i < size; ++i) {
      KeyVersion kv = keyVersions.get(i);
      builder.addKeyVersion(kv.buildData());
      if (kv == primary) {
        builder.setPrimary(i);
      }
    }
    if (size > 0 && !builder.hasPrimary()) {
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.