The tag <security.make.keys> allows to generate pais of public and private keys. For this, it uses the class java.security.KeyPairGenerator.
It generates each one of the keys in the file which is passed as argument.
1 security.make.keys
<security.make.keys
algorithm='algorithm'
key-size='key-size'
>
<private-key /> *
<public-key /> *
</security.make.keys>
Attributes | |||||
---|---|---|---|---|---|
Name | Type | Required | Default | Description | |
Aalgorithm | string | Algorithm of generation (RSA, DSA...). All the types are detailed in this document. | |||
Akey-size | integer | Initialize the generator of pair of keys for a determinated size of the key using a set of parameters by default and the SecureRandom application of the provider installed as the source of randomness. (If any of the installed providers, supply of a SecureRandom implementation, A source provided by the randomness system is used). This is a specific metrics of the algorithm, such as module length, it is specified in the number of bits. |
Arguments | |||||
---|---|---|---|---|---|
Name | Type | Required | Unique | Nullable | Description |
Eprivate-key | File | It is the file where the private key is stored. | |||
Epublic-key | File | It is the file where the public key is stored. |
Example
Generate a pair of keys through a private key and a public one.
Copy
<xsql-script name='push_test'> <body> <security.make.keys algorithm='RSA' key-size='1024'> <file type='absolute' name='private.der' /> <file type='absolute' name='public.der' /> </security.make.keys> <println>HASH:<hash /></println> </body> </xsql-script>