Verificate a certifiet hash. Giving a hash and a message, it is verified that this hash has been
generated from the given message.
1 security.sign.verify
<security.sign.verify
algorithm='algorithm'
hash-size='hash-size'
>
<private-key /> *
<public-key /> *
<message /> *
<hash /> *
</security.sign.verify>
Attributes | |||||
---|---|---|---|---|---|
Name | Type | Required | Default | Description | |
Aalgorithm | string | Algorithm of generation (RSA, DSA...). In this document are detailed all the types. | |||
Ahash-size | integer | Indicate the lenght of the hash which you want to generate. |
Arguments | |||||
---|---|---|---|---|---|
Name | Type | Required | Unique | Nullable | Description |
Eprivate-key | file|byte[]|strBase64 | ||||
Epublic-key | file|byte[]|strBase64 | ||||
Emessage | String | ||||
Ehash | String |
Returns | |
---|---|
Type | Description |
Boolean | Returns true if the hash generated for the keys match with the given message. |
Example
Copy
<xsql-script name='push_test'> <body> <set name='verify'> <security.sign.verify algorithm='SHA1withRSA' hash-size='172'> <file type='absolute' name='private.der' /> <file type='absolute' name='public.der' /> <message /> <hash /> </security.sign.verify> </set> <println>VERIFY:<verify /></println> </body> </xsql-script>