Checks if the crypto mode is supported by the runtime.

@throws UnsupportedOperationException
if the necessary security provider cannot be found or the
necessary cryptographic operations are not supported for the
specified crypto mode.
496606
private void check(CryptoMode cryptoMode) {
        if (cryptoMode == CryptoMode.AuthenticatedEncryption
                || cryptoMode == CryptoMode.StrictAuthenticatedEncryption) {
            if (!CryptoRuntime.isBouncyCastleAvailable()) {
                CryptoRuntime.enableBouncyCastle();
                if (!CryptoRuntime.isBouncyCastleAvailable()) {
                    throw new UnsupportedOperationException(
                            "The Bouncy castle library jar is required on the classpath to enable authenticated encryption");
                }
            }
            if (!CryptoRuntime.isAesGcmAvailable())
                throw new UnsupportedOperationException(
                        "More recent version of the Bouncy castle library is required to enable authenticated encryption");
        }
    }
328202
private ConnectionSpec supportedSpec(SSLSocket sslSocket, boolean isFallback) {
    String[] cipherSuitesToEnable = null;
    if (cipherSuites != null) {
      String[] cipherSuitesToSelectFrom = sslSocket.getEnabledCipherSuites();
      cipherSuitesToEnable =
          Util.intersect(String.class, cipherSuites, cipherSuitesToSelectFrom);
    }

    if (isFallback) {
      // In accordance with https://tools.ietf.org/html/draft-ietf-tls-downgrade-scsv-00
      // the SCSV cipher is added to signal that a protocol fallback has taken place.
      final String fallbackScsv = "TLS_FALLBACK_SCSV";
      boolean socketSupportsFallbackScsv =
          Arrays.asList(sslSocket.getSupportedCipherSuites()).contains(fallbackScsv);

      if (socketSupportsFallbackScsv) {
        // Add the SCSV cipher to the set of enabled cipher suites iff it is supported.
        String[] oldEnabledCipherSuites = cipherSuitesToEnable != null
            ? cipherSuitesToEnable
            : sslSocket.getEnabledCipherSuites();
        String[] newEnabledCipherSuites = new String[oldEnabledCipherSuites.length + 1];
        System.arraycopy(oldEnabledCipherSuites, 0,
            newEnabledCipherSuites, 0, oldEnabledCipherSuites.length);
        newEnabledCipherSuites[newEnabledCipherSuites.length - 1] = fallbackScsv;
        cipherSuitesToEnable = newEnabledCipherSuites;
      }
    }

    String[] protocolsToSelectFrom = sslSocket.getEnabledProtocols();
    String[] protocolsToEnable = Util.intersect(String.class, tlsVersions, protocolsToSelectFrom);
    return new Builder(this)
        .cipherSuites(cipherSuitesToEnable)
        .tlsVersions(protocolsToEnable)
        .build();
  }
999655
private void initializeEncryptionProvider() {
		if (key != null) {
			try {
				encryptionProvider = EncryptionProviderFactory.getProvider(key);
			} catch (UnsupportedKeySizeException e) {
				throw new RuntimeCryptoException(e.getMessage(), e);
			} catch (UnsupportedAlgorithmException e) {
				throw new RuntimeCryptoException(e.getMessage(), e);
			}
		}
	}
560035
@Override
    public List find(List<IndexClause> ixClause, EntityMetadata m, boolean isRelation, List<String> relations,
        int maxResult, List<String> columns) {
        throw new UnsupportedOperationException("Support available only for thrift/pelops.");
    }
982345
@Override
  public <C extends Configuration<K, V>> C getConfiguration(Class<C> clazz) {
    throw new UnsupportedOperationException();
  }
731900
public void authenticate(){
        if(fingerprintSecureCallback!=null){
            if(cryptoObject!=null){
                throw new RuntimeException("If you specify a CryptoObject you have to use FingerprintCallback");
            }
            cryptoObject = cipherHelper.getEncryptionCryptoObject();
            if(cryptoObject==null) {
                fingerprintSecureCallback.onNewFingerprintEnrolled(new FingerprintToken(cipherHelper));
            }
        }
        else if(fingerprintCallback==null){
            throw new RuntimeException("You must specify a callback.");
        }

        cancellationSignal = new CancellationSignal();
        if(fingerprintManager.isHardwareDetected() && fingerprintManager.hasEnrolledFingerprints()) {
            fingerprintManager.authenticate(cryptoObject, cancellationSignal, 0, new FingerprintManager.AuthenticationCallback() {
                @Override
                public void onAuthenticationError(int errorCode, CharSequence errString) {
                    super.onAuthenticationError(errorCode, errString);
                    setStatus(R.drawable.fingerprint_error, fingerprintError, circleError);
                    handler.postDelayed(returnToScanning, delayAfterError);
                    if(fingerprintSecureCallback!=null){
                        fingerprintSecureCallback.onAuthenticationError(errorCode, errString.toString());
                    } else{
                        fingerprintCallback.onAuthenticationError(errorCode, errString.toString());
                    }
                }

                @Override
                public void onAuthenticationHelp(int helpCode, CharSequence helpString) {
                    super.onAuthenticationHelp(helpCode, helpString);
                    setStatus(R.drawable.fingerprint_error, fingerprintError, circleError);
                    handler.postDelayed(returnToScanning, delayAfterError);
                    if(fingerprintSecureCallback!=null){
                        fingerprintSecureCallback.onAuthenticationError(helpCode, helpString.toString());
                    } else{
                        fingerprintCallback.onAuthenticationError(helpCode, helpString.toString());
                    }
                }

                @Override
                public void onAuthenticationSucceeded(final FingerprintManager.AuthenticationResult result) {
                    super.onAuthenticationSucceeded(result);
                    handler.removeCallbacks(returnToScanning);
                    setStatus(R.drawable.fingerprint_success, fingerprintSuccess, circleSuccess);
                    if(fingerprintSecureCallback!=null){
                        fingerprintSecureCallback.onAuthenticationSucceeded();
                    }
                    else{
                        fingerprintCallback.onAuthenticationSucceeded();
                    }
                    tryCounter = 0;
                }

                @Override
                public void onAuthenticationFailed() {
                    super.onAuthenticationFailed();
                    setStatus(R.drawable.fingerprint_error, fingerprintError, circleError);
                    handler.postDelayed(returnToScanning, delayAfterError);
                    handler.postDelayed(checkForLimit, delayAfterError);
                    if(fingerprintSecureCallback!=null){
                        fingerprintSecureCallback.onAuthenticationFailed();
                    }
                    else{
                        fingerprintCallback.onAuthenticationFailed();
                    }
                }
            }, null);
        }
        else{
            Log.e(TAG, "Fingerprint scanner not detected or no fingerprint enrolled. Use FingerprintView#isAvailable(Context) before.");
        }
    }
472800
def _validate_if_patch_supported(self, headers, uri):
        """"""
        if not self._operation_allowed(headers, 'PATCH'):
                msg = ('PATCH Operation not supported on the resource '
                       '"%s"' % uri)
                raise exception.IloError(msg)
435957
public static boolean areSoSourcesAbisSupported() {
    sSoSourcesLock.readLock().lock();
    try {
      if (sSoSources == null) {
        return false;
      }

      String supportedAbis[] = SysUtil.getSupportedAbis();
      for (int i = 0; i < sSoSources.length; ++i) {
        String[] soSourceAbis = sSoSources[i].getSoSourceAbis();
        for (int j = 0; j < soSourceAbis.length; ++j) {
          boolean soSourceSupported = false;
          for (int k = 0; k < supportedAbis.length && !soSourceSupported; ++k) {
            soSourceSupported = soSourceAbis[j].equals(supportedAbis[k]);
          }
          if (!soSourceSupported) {
            Log.e(TAG, "abi not supported: " + soSourceAbis[j]);
            return false;
          }
        }
      }

      return true;
    } finally {
      sSoSourcesLock.readLock().unlock();
    }
  }
1030669
public boolean supports(final WebContext ctx) {
        return AWS_AUTH4_PATTERN.matcher(ctx.getHeaderValue("Authorization").asString("")).matches()
               || X_AMZ_CREDENTIAL_PATTERN.matcher(ctx.get("X-Amz-Credential").asString("")).matches();
    }
361880
def _is_version_supported_method(container, method_version):
        
        tmos_v = container._meta_data['bigip'].tmos_version
        if LooseVersion(tmos_v) < LooseVersion(method_version):
            error = "There was an attempt to use a method which " \
                    "has not been implemented or supported " \
                    "in the device's TMOS version: %s. " \
                    "Minimum TMOS version supported is %s" % (
                        tmos_v, method_version)
            raise UnsupportedTmosVersion(error)
649747
public boolean isContextSupported(Class<? extends WorkContext> workContextClass)
   {
      if (workContextClass == null)
         return false;

      return supportedContexts.contains(workContextClass);
   }
208827
@Override
    protected final void performRuntime(OperationContext context, ModelNode operation, Resource resource) throws OperationFailedException {
        throw new UnsupportedOperationException();
    }
17793
def ensure_crypto_config(partition):
    

    if 'crypto-configuration' not in partition.properties or \
            partition.properties['crypto-configuration'] is None:
        partition.properties['crypto-configuration'] = {}
    crypto_config = partition.properties['crypto-configuration']

    if 'crypto-adapter-uris' not in crypto_config or \
            crypto_config['crypto-adapter-uris'] is None:
        crypto_config['crypto-adapter-uris'] = []
    adapter_uris = crypto_config['crypto-adapter-uris']

    if 'crypto-domain-configurations' not in crypto_config or \
            crypto_config['crypto-domain-configurations'] is None:
        crypto_config['crypto-domain-configurations'] = []
    domain_configs = crypto_config['crypto-domain-configurations']

    return adapter_uris, domain_configs
366899
function isPlusPlusUnaryOperation (node) {
  return nodeType(node, exactMatch(nodeTypes.UNARYOPERATION)) && operator(node, exactMatch(util.escapeRegExp('++')))
}
1307304
boolean checkIntegrity () {
        if (headerType == null) return false;
        if (headerType == HeaderType.MODE_PARAMETER_HEADER_6 && longLba) return false;
        return true;
    }
881229
public static Platform detect() throws UnsupportedPlatformException {
        String osArch = getProperty("os.arch");
        String osName = getProperty("os.name");

        for (Arch arch : Arch.values()) {
            if (arch.pattern.matcher(osArch).matches()) {
                for (OS os : OS.values()) {
                    if (os.pattern.matcher(osName).matches()) {
                        return new Platform(arch, os);
                    }
                }
            }
        }

        String msg = String.format("Unsupported platform %s %s", osArch, osName);
        throw new UnsupportedPlatformException(msg);
    }
444565
public boolean hasUnsupportedCriticalExtension() {
        if (info == null)
            return false;
        try {
            CertificateExtensions exts = (CertificateExtensions)info.get(
                                         CertificateExtensions.NAME);
            if (exts == null)
                return false;
            return exts.hasUnsupportedCriticalExtension();
        } catch (Exception e) {
            return false;
        }
    }