core/src/main/java/com/orientechnologies/orient/core/security/symmetrickey/OSymmetricKey.java
public static OSymmetricKey fromConfig(final OSymmetricKeyConfig keyConfig) {
    if (keyConfig.usesKeyString()) {
      return fromString(keyConfig.getKeyAlgorithm(), keyConfig.getKeyString());
    } else if (keyConfig.usesKeyFile()) {
      return fromFile(keyConfig.getKeyAlgorithm(), keyConfig.getKeyFile());
    } else if (keyConfig.usesKeystore()) {
      return fromKeystore(keyConfig.getKeystoreFile(), keyConfig.getKeystorePassword(), keyConfig.getKeystoreKeyAlias(),
          keyConfig.getKeystoreKeyPassword());
    } else {
      throw new OSecurityException("OSymmetricKey(OSymmetricKeyConfig) Invalid configuration");
    }
  }
public static OSymmetricKey fromConfig(final OSymmetricKeyConfig keyConfig) {
    if (keyConfig.usesKeyString()) {
      return fromString(keyConfig.getKeyAlgorithm(), keyConfig.getKeyString());
    } else if (keyConfig.usesKeyFile()) {
      return fromFile(keyConfig.getKeyAlgorithm(), keyConfig.getKeyFile());
    } else if (keyConfig.usesKeystore()) {
      return fromKeystore(keyConfig.getKeystoreFile(), keyConfig.getKeystorePassword(), keyConfig.getKeystoreKeyAlias(),
          keyConfig.getKeystoreKeyPassword());
    } else {
      throw new OSecurityException("OSymmetricKey(OSymmetricKeyConfig) Invalid configuration");
    }
  }
public static OSymmetricKey fromConfig ( final OSymmetricKeyConfig keyConfig ) { if ( keyConfig . usesKeyString ( ) ) { return fromString ( keyConfig . getKeyAlgorithm ( ) , keyConfig . getKeyString ( ) ) ; } else if ( keyConfig . usesKeyFile ( ) ) { return fromFile ( keyConfig . getKeyAlgorithm ( ) , keyConfig . getKeyFile ( ) ) ; } else if ( keyConfig . usesKeystore ( ) ) { return fromKeystore ( keyConfig . getKeystoreFile ( ) , keyConfig . getKeystorePassword ( ) , keyConfig . getKeystoreKeyAlias ( ) , keyConfig . getKeystoreKeyPassword ( ) ) ; } else { throw new OSecurityException ( "OSymmetricKey(OSymmetricKeyConfig) Invalid configuration" ) ; } }
Creates an OSymmetricKey from an OSymmetricKeyConfig interface.
Creates an OSymmetricKey from an OSymmetricKeyConfig interface .