core/src/main/java/com/orientechnologies/orient/core/security/symmetrickey/OSymmetricKey.java
public static OSymmetricKey fromFile(final String algorithm, final String path) {
    String base64Key = null;

    try {
      java.io.FileInputStream fis = null;

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

        return fromStream(algorithm, fis);
      } finally {
        if (fis != null)
          fis.close();
      }
    } catch (Exception ex) {
      throw OException.wrapException(new OSecurityException("OSymmetricKey.fromFile() Exception: " + ex.getMessage()), ex);
    }
  }
public static OSymmetricKey fromFile(final String algorithm, final String path) {
    String base64Key = null;

    try {
      java.io.FileInputStream fis = null;

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

        return fromStream(algorithm, fis);
      } finally {
        if (fis != null)
          fis.close();
      }
    } catch (Exception ex) {
      throw OException.wrapException(new OSecurityException("OSymmetricKey.fromFile() Exception: " + ex.getMessage()), ex);
    }
  }
Creates an OSymmetricKey from a file containing a Base64 key.