mirror of
https://github.com/luxfi/mpc.git
synced 2026-09-24 00:26:24 +00:00
- pkg/infra: Add abstract KV interface, ConsensusKV (dual-cert BFT with Ed25519 + ML-DSA-65), NatsKV, ConsulKVAdapter, HybridKV, SQLiteMeta with full test coverage - pkg/hsm: Add Provider interface and implementations for AWS KMS, GCP Cloud KMS, Azure Key Vault, Zymbit HSM, Hanzo KMS, and file-based providers with registry and tests. Rename existing FileProvider to FilePasswordProvider to avoid collision with new Provider interface - pkg/policy: Add transaction governance engine with signers, roles, spending limits, whitelist/blacklist, time windows, rate limiting, approval workflow, audit log, and FHE private policy evaluation - contracts: Add ThresholdPolicy.sol for on-chain policy enforcement - cmd: Rename lux-mpc-cli to mpc-cli - Makefile: Update build targets for mpc-cli
17 lines
246 B
Go
17 lines
246 B
Go
package main
|
|
|
|
import "unicode"
|
|
|
|
func ContainsAtLeastNSpecial(s string, n int) bool {
|
|
count := 0
|
|
for _, r := range s {
|
|
if !(unicode.IsLetter(r) || unicode.IsDigit(r)) {
|
|
count++
|
|
if count >= n {
|
|
return true
|
|
}
|
|
}
|
|
}
|
|
return false
|
|
}
|