klyn.cryptography.MessageDigest.getInstance
method

    public static getInstance(algorithm as String) as MessageDigest throws CryptoException:

Description

Compatibility factory for dynamic algorithm selection.

Direct subclass construction such as `SHA256()` or `SHA3_512()` remains the primary API. This helper exists for configuration-driven code paths and for transition from the previous design.

Parameters

Parameter | Description
--- | ---
`algorithm` | Digest algorithm.

Returns

Ready-to-use digest instance.

Throws

- CryptoException when the algorithm is unsupported.

Example

    import klyn.cryptography

    name = "SHA-256"
    md = MessageDigest.getInstance(name)
    print(md.algorithm)