Codota Logo
Properties.isOverrideSet
Code IndexAdd Codota to your IDE (free)

How to use
isOverrideSet
method
in
org.spongycastle.util.Properties

Best Java code snippets using org.spongycastle.util.Properties.isOverrideSet (Showing top 7 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
BufferedReader b =
  • Codota IconInputStream in;new BufferedReader(new InputStreamReader(in))
  • Codota IconReader in;new BufferedReader(in)
  • Codota IconFile file;new BufferedReader(new FileReader(file))
  • Smart code suggestions by Codota
}
origin: com.madgag.spongycastle/core

/**
 * Enable the specified override property for the current thread only.
 *
 * @param propertyName the property name for the override.
 * @param enable true if the override should be enabled, false if it should be disabled.
 * @return true if the override was already set, false otherwise.
 */
public static boolean setThreadOverride(String propertyName, boolean enable)
{
  boolean isSet = isOverrideSet(propertyName);
  Map localProps = (Map)threadProperties.get();
  if (localProps == null)
  {
    localProps = new HashMap();
  }
  localProps.put(propertyName, enable ? "true" : "false");
  threadProperties.set(localProps);
  return isSet;
}
origin: com.madgag.spongycastle/core

/**
 * Enable the specified override property in the current thread only.
 *
 * @param propertyName the property name for the override.
 * @return true if the override set true in thread local, false otherwise.
 */
public static boolean removeThreadOverride(String propertyName)
{
  boolean isSet = isOverrideSet(propertyName);
  Map localProps = (Map)threadProperties.get();
  if (localProps == null)
  {
    return false;
  }
  localProps.remove(propertyName);
  if (localProps.isEmpty())
  {
    threadProperties.remove();
  }
  else
  {
    threadProperties.set(localProps);
  }
  return isSet;
}
origin: com.madgag.spongycastle/core

ASN1Integer(byte[] bytes, boolean clone)
{
  // Apply loose validation, see note in public constructor ANS1Integer(byte[])
  if (!Properties.isOverrideSet("org.spongycastle.asn1.allow_unsafe_integer"))
  {
    if (isMalformed(bytes))
    {                           
      throw new IllegalArgumentException("malformed integer");
    }
  }
  this.bytes = (clone) ? Arrays.clone(bytes) : bytes;
}
origin: com.madgag.spongycastle/core

/**
 * Constructor from encoded BigInteger.
 *
 * @param bytes the value of this enumerated as an encoded BigInteger (signed).
 */
public ASN1Enumerated(
  byte[]   bytes)
{
  if (!Properties.isOverrideSet("org.spongycastle.asn1.allow_unsafe_integer"))
  {
    if (ASN1Integer.isMalformed(bytes))
    {
      throw new IllegalArgumentException("malformed enumerated");
    }
  }
  this.bytes = Arrays.clone(bytes);
}
origin: com.madgag.spongycastle/core

public BigInteger calculateAgreement(CipherParameters pubKey)
{
  if (Properties.isOverrideSet("org.spongycastle.ec.disable_mqv"))
  {
    throw new IllegalStateException("ECMQV explicitly disabled");
  }
  MQVPublicParameters pubParams = (MQVPublicParameters)pubKey;
  ECPrivateKeyParameters staticPrivateKey = privParams.getStaticPrivateKey();
  ECDomainParameters parameters = staticPrivateKey.getParameters();
  if (!parameters.equals(pubParams.getStaticPublicKey().getParameters()))
  {
    throw new IllegalStateException("ECMQV public key components have wrong domain parameters");
  }
  ECPoint agreement = calculateMqvAgreement(parameters, staticPrivateKey,
    privParams.getEphemeralPrivateKey(), privParams.getEphemeralPublicKey(),
    pubParams.getStaticPublicKey(), pubParams.getEphemeralPublicKey()).normalize();
  if (agreement.isInfinity())
  {
    throw new IllegalStateException("Infinity is not a valid agreement value for MQV");
  }
  return agreement.getAffineXCoord().toBigInteger();
}
origin: com.madgag.spongycastle/prov

if (Properties.isOverrideSet("org.spongycastle.dsa.FIPS186-2for1024bits"))
origin: com.madgag.spongycastle/prov

registerOidAlgorithmParameters(provider, SECObjectIdentifiers.dhSinglePass_cofactorDH_sha512kdf_scheme, "EC");
if (!Properties.isOverrideSet("org.spongycastle.ec.disable_mqv"))
org.spongycastle.utilPropertiesisOverrideSet

Javadoc

Return whether a particular override has been set to true.

Popular methods of Properties

  • asBigInteger
  • asKeySet
  • fetchProperty

Popular in Java

  • Running tasks concurrently on multiple threads
  • scheduleAtFixedRate (ScheduledExecutorService)
  • notifyDataSetChanged (ArrayAdapter)
  • getSharedPreferences (Context)
  • ResultSet (java.sql)
    An interface for an object which represents a database table entry, returned as the result of the qu
  • CountDownLatch (java.util.concurrent)
    A synchronization aid that allows one or more threads to wait until a set of operations being perfor
  • Executors (java.util.concurrent)
    Factory and utility methods for Executor, ExecutorService, ScheduledExecutorService, ThreadFactory,
  • Cipher (javax.crypto)
    This class provides access to implementations of cryptographic ciphers for encryption and decryption
  • JCheckBox (javax.swing)
  • Loader (org.hibernate.loader)
    Abstract superclass of object loading (and querying) strategies. This class implements useful common
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now