Loading TOC...

xdmp:rsa-generate

xdmp:rsa-generate(
   $options as (element()|map:map)?
) as xs:string+

Summary

Generate a new RSA public/private key pair. Returns a list of two PEM encoded strings. The first is the private key, the second is the public key.

Parameters
$options

Options with which to customize this function. You can specify options as either an XML options element in the "ssl:options" namespace or a map:map. When using a map, replace the hyphens in an option name with camel casing. For example, "an-option" becomes "anOption" when used a map key. This function supports the following options:

key-length
pass-phrase

Example

(: Using an options element :)
xdmp:rsa-generate(
  <options xmlns="ssl:options">
    <key-length>2048</key-length>
  </options>)

Example

(: Using an options map :)
xdmp:rsa-generate(map:map() => map:with("keyLength", 2048))

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.