/** * Get the encryption type. * @param eType The encryption type string. * @return The EncryptionType * @throws KrbException e */ public static EncryptionType getEncryptionType(String eType) throws KrbException { return EncryptionType.fromName(eType); }
/** * Get the encryption type. * @param eType The encryption type string. * @return The EncryptionType * @throws KrbException e */ public static EncryptionType getEncryptionType(String eType) throws KrbException { return EncryptionType.fromName(eType); }
protected List<EncryptionType> getEncryptionTypes(List<String> encTypeNames) { List<EncryptionType> results = new ArrayList<>(encTypeNames.size()); for (String eTypeName : encTypeNames) { EncryptionType eType = EncryptionType.fromName(eTypeName); if (eType != EncryptionType.NONE) { results.add(eType); } } return results; }
protected List<EncryptionType> getEncryptionTypes(List<String> encTypeNames) { List<EncryptionType> results = new ArrayList<>(encTypeNames.size()); for (String eTypeName : encTypeNames) { EncryptionType eType = EncryptionType.fromName(eTypeName); if (eType != EncryptionType.NONE) { results.add(eType); } } return results; }
/** * Get the encryption handler. * * @param eType The encryption type string * @return The EncTypeHandler * @throws KrbException e */ public static EncTypeHandler getEncHandler(String eType) throws KrbException { EncryptionType result = EncryptionType.fromName(eType); return getEncHandler(result); }
/** * Get the encryption handler. * * @param eType The encryption type string * @return The EncTypeHandler * @throws KrbException e */ public static EncTypeHandler getEncHandler(String eType) throws KrbException { EncryptionType result = EncryptionType.fromName(eType); return getEncHandler(result); }
public EncryptionType getEncryptionKeyType(String type) throws KeeperException { String znode = IdentityZNodeHelper.getEncryptionKeyTypeZNode(this.identityName, type); if (ZKUtil.checkExists(this.zk, znode) == -1) { throw new IllegalArgumentException("The znode " + znode + " is not found"); } byte[] data = new byte[0]; try { data = ZKUtil.getData(this.zk, znode); } catch (InterruptedException e) { Thread.currentThread().interrupt(); } if (data != null) { return EncryptionType.fromName(Utf8.toString(data)); } else { LOG.warn("can't get the date from znode: " + znode); return null; } }
EncryptionType eType = EncryptionType.fromName(keyType); byte[] keyValue = resIdentity.getBytes("key_value"); EncryptionKey key = new EncryptionKey(eType, keyValue, kvno);
EncryptionType eType = EncryptionType.fromName(keyType); byte[] keyValue = resIdentity.getBytes("key_value"); EncryptionKey key = new EncryptionKey(eType, keyValue, kvno);