generate

open fun generate(): KeyPair

Generate an RSA KeyPair with a length of 2048.

Return

RSA KeyPair with a length of 2048

Throws

If the algorithm can't be found on the system.


open fun generate(keyLength: Integer): KeyPair

Generate an RSA KeyPair

Return

RSA KeyPair

Parameters

keyLength

The key length in bytes. Should be one of 1024, 2048 or 4096.

Throws

If the algorithm can't be found on the system.