Org.BouncyCastle.Utilities.Properties
Utility methods for managing properties.
The maximum permitted memory exponent (i.e. memory <= (1 << MaxMemoryExp).
The maximum Argon2 parallelism (lanes) accepted when a key is derived from untrusted cost parameters.
The maximum number of Argon2 passes (iterations) accepted when a key is derived from untrusted cost
parameters.
Allow legacy RSA PKCS#1 v1.5 key-transport unwrap in CMS when the content-encryption key has no fixed size.
Upper bound on the PBKDF2 iteration count honoured when decrypting a PBES2-protected PKCS#8/PEM private key.
Upper bound, in bytes, on the scrypt working memory (~128 * N * r) honoured when decrypting a
PBES2-protected PKCS#8 / PEM private key.
When set to true, suppresses the error raised when loading a PKCS12 store with a password, for data
that does not require a password.
If set, a PKCS12 file with a larger iteration count on PBE processing will be rejected. Default 5,000,000.
Upper bound on the RFC 4211 PKMAC / CMP password-based-MAC iteration count honoured when no explicit ceiling
is supplied.
Salvage a non-contiguous iPAddress name-constraint subnet mask instead of rejecting it. An iPAddress
name constraint carries a subnet mask expected to be CIDR (a run of leading 1-bits); a non-contiguous
mask is malformed per RFC 4632 and also lets the subtree set-algebra mint new ranges (a super-linear
blow-up on hostile input). By default such a constraint is rejected (fail-closed). When set, the mask
is instead rounded to the most-restrictive contiguous mask for its context - a permitted subtree is
narrowed (fill up to the last 1-bit; under-permit), an excluded subtree is broadened (keep only the
leading 1-bits; over-exclude) - so validation can only get stricter, never laxer. Strict rejection is
the default; this is a safety valve, not a recommended mode.
Fall back to the legacy lenient parsing of rfc822Name values in X.509 name-constraint checks. By default the
validator is strict about rfc822Name conformance; today that means a tested rfc822Name with more than one
'@' is rejected as ambiguous when email constraints apply (RFC 5321 sec. 4.1.2 allows '@' inside a quoted
local part, so the domain is not simply the text after the first '@', and a wrong split could evade a
constraint). When set, that strictness (and any future rfc822Name conformance strictness) is disabled and
the historical permissive parsing is used instead. Strict is the default; set this only to restore the old
behaviour. This is a safety valve, not a recommended mode.
Opt in to the relaxed directoryName name-constraint matching required by GSMA SGP.22 v2.5 (Remote SIM
Provisioning), sections 4.5.2.1.0.2 / 4.5.2.1.0.3. When set, a permitted-subtree RDN is satisfied by any
matching subject RDN regardless of position, additional subject attributes beyond those named in the subtree
are tolerated, and a serialNumber RDN is matched with a StartsWith comparison wherever it appears.
This is deliberately looser than the contiguous-prefix DN matching mandated by RFC 5280 7.1, so it defaults
to off and must be enabled explicitly; BC's default validation remains RFC 5280 strict.
Return the string value of the property name.
Return the string value of the property name, or
defaultValue if that property is not defined.
public static TResult WithThreadProperty<TArg, TResult>(string name, string value, TArg arg, Func<TArg, TResult> func)