core/src/main/java/com/orientechnologies/orient/core/security/symmetrickey/OSymmetricKey.java
public static OSymmetricKey fromKeystore(final String path, final String password, final String keyAlias,
      final String keyPassword) {
    OSymmetricKey sk = null;

    try {
      KeyStore ks = KeyStore.getInstance("JCEKS"); // JCEKS is required to hold SecretKey entries.

      java.io.FileInputStream fis = null;

      try {
        fis = new java.io.FileInputStream(OSystemVariableResolver.resolveSystemVariables(path));

        return fromKeystore(fis, password, keyAlias, keyPassword);
      } finally {
        if (fis != null)
          fis.close();
      }
    } catch (Exception ex) {
      throw OException.wrapException(new OSecurityException("OSymmetricKey.fromKeystore() Exception: " + ex.getMessage()), ex);
    }
  }
public static OSymmetricKey fromKeystore(final String path, final String password, final String keyAlias,
      final String keyPassword) {
    OSymmetricKey sk = null;

    try {
      KeyStore ks = KeyStore.getInstance("JCEKS"); // JCEKS is required to hold SecretKey entries.

      java.io.FileInputStream fis = null;

      try {
        fis = new java.io.FileInputStream(OSystemVariableResolver.resolveSystemVariables(path));

        return fromKeystore(fis, password, keyAlias, keyPassword);
      } finally {
        if (fis != null)
          fis.close();
      }
    } catch (Exception ex) {
      throw OException.wrapException(new OSecurityException("OSymmetricKey.fromKeystore() Exception: " + ex.getMessage()), ex);
    }
  }
Creates an OSymmetricKey from a Java "JCEKS" KeyStore.

@param path        The location of the KeyStore file.
@param password    The password for the KeyStore.  May be null.
@param keyAlias    The alias name of the key to be used from the KeyStore.  Required.
@param keyPassword The password of the key represented by keyAlias.  May be null.