Package com.google.k2crypto.keyversions.KeyVersionProto

Examples of com.google.k2crypto.keyversions.KeyVersionProto.Type


      throw new NullPointerException("kvClass");
    }

    RegisteredKeyVersion regKeyVersion =
        new RegisteredKeyVersion(context, kvClass);
    Type type = regKeyVersion.getType();
   
    synchronized (keyVersions) {
      if (keyVersions.containsKey(type)) {
        return null;
      }
View Full Code Here


   */
  private void checkRegistered(
      KeyVersionRegistry registry,
      RegisteredKeyVersion rkv,
      FieldDescriptor fd) throws K2Exception {
    Type type = rkv.getType();
    assertEquals(rkv, registry.getRegistration(type));
    assertTrue(registry.isRegistered(type));
    assertEquals(fd, registry
        .getProtoExtensions().findExtensionByName(fd.getFullName()).descriptor);
    assertEquals(
View Full Code Here

   * Tests all relevant methods when registering and unregistering a single key
   * version.
   */
  @Test public final void testOneKeyVersion() throws K2Exception {
    KeyVersionRegistry registry = new KeyVersionRegistry(context);
    final Type type = Type.TEST;
    final FieldDescriptor fd = MockKeyVersionCore.extension.getDescriptor();

    // Check initial state (should be empty)
    assertEquals(0, registry.getRegisteredKeyVersions().size());
    checkNotRegistered(registry, type, fd);
View Full Code Here

TOP

Related Classes of com.google.k2crypto.keyversions.KeyVersionProto.Type

Copyright © 2018 www.massapicom. 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.