klyn.cryptography.Signature.verify
method

    public verify(signature as String, text as String = null, inputEncoding as String = "base64") as Boolean throws CryptoException:

Description

Verifies a signature against the buffered text and an optional final chunk.

Parameters

- signature Encoded signature value.
- text Optional final UTF-8 chunk.
- inputEncoding Signature encoding: `base64`, `base64url` or `hex`.

Returns

True when the signature is valid.

Throws

- CryptoException when the instance is not initialized for verification. ```klyn import klyn.cryptography keys = RSAKeyPairGenerator().generateKeyPair() signer = RSAPSSSignature(SHA256()) signer.initSign(keys.privateKeyPem) token = signer.sign("hello") verifier = RSAPSSSignature(SHA256()) verifier.initVerify(keys.publicKeyPem) print(verifier.verify(token, "hello")) ```