Examples of KeyType


Examples of org.crsh.keyboard.KeyType

            }
          } else if (type.getAsString().equals("key")) {
            WSProcessContext current = session.current.get();
            if (current != null) {
              String _keyType = event.get("keyType").getAsString();
              KeyType keyType = KeyType.valueOf(_keyType.toUpperCase());
              if (keyType == KeyType.CHARACTER) {
                int code = event.get("keyCode").getAsInt();
                if (code >= 32) {
                  current.handle(KeyType.CHARACTER, new int[]{code});
                }
View Full Code Here

Examples of org.crsh.keyboard.KeyType

              }
            }
          } else {
            KeyHandler keyHandler = processHandler.process.getKeyHandler();
            if (keyHandler != null) {
              KeyType type = key.map();
              try {
                keyHandler.handle(type, key.sequence);
              }
              catch (Throwable t) {
                // Perhaps handle better this and treat error / exception differently
View Full Code Here

Examples of org.keyczar.interfaces.KeyType

    return kmd.getType();
  }

  public boolean addKey(int versionNumber, KeyStatus status)
      throws KeyczarException {
    KeyType type = kmd.getType();
    KeyczarKey key = type.getBuilder().generate(type.applyDefaultParameters(null));
    keys.put(versionNumber, key);
    return kmd.addVersion(new KeyVersion(versionNumber, status, false));
  }
View Full Code Here

Examples of org.keyczar.interfaces.KeyType

   * @param status KeyStatus desired for new key version
   * @param keyParams parameters for new key generation.
   * @throws KeyczarException if key type is unsupported.
   */
  public void addVersion(KeyStatus status, KeyParameters keyParams) throws KeyczarException {
    KeyType type = kmd.getType();
    KeyczarKey key;
    do {
      key = type.getBuilder().generate(keyParams);
    } while (haveKeyWithId(key.hash()));
    addVersion(status, key);
  }
View Full Code Here

Examples of org.keyczar.interfaces.KeyType

    final KeyMetadata destMetadata = destinationKeyczar.getMetadata();
    final GenericKeyczar sourceKeyczar =
        getImportingKeyczar(pemFileFlag, paddingFlag, passphraseFlag, destMetadata.getPurpose());

    // Change destination type if necessary, but only if there aren't any keys in it yet.
    final KeyType sourceKeyType = sourceKeyczar.getMetadata().getType();
    if (destMetadata.getType() != sourceKeyType
        && destinationKeyczar.getVersions().isEmpty()) {
      destMetadata.setType(sourceKeyType);
    }
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.