crypto.json•6.1 kB
{
"nodeType": "n8n-nodes-base.crypto",
"displayName": "Crypto",
"description": "Provide cryptographic utilities",
"version": 1,
"properties": [
{
"name": "action",
"displayName": "Action",
"type": "options",
"default": "hash",
"description": "Generate random string",
"options": [
{
"name": "Generate",
"value": "generate",
"description": "Generate random string"
},
{
"name": "Hash",
"value": "hash",
"description": "Hash a text or file in a specified format"
},
{
"name": "Hmac",
"value": "hmac",
"description": "Hmac a text or file in a specified format"
},
{
"name": "Sign",
"value": "sign",
"description": "Sign a string using a private key"
}
]
},
{
"name": "type",
"displayName": "Type",
"type": "options",
"default": "MD5",
"description": "The hash type to use",
"required": true,
"options": [
{
"name": "MD5",
"value": "MD5"
},
{
"name": "SHA256",
"value": "SHA256"
},
{
"name": "SHA3-256",
"value": "SHA3-256"
},
{
"name": "SHA3-384",
"value": "SHA3-384"
},
{
"name": "SHA3-512",
"value": "SHA3-512"
},
{
"name": "SHA384",
"value": "SHA384"
},
{
"name": "SHA512",
"value": "SHA512"
}
],
"displayOptions": {
"show": {
"action": [
"hash"
]
}
}
},
{
"name": "binaryData",
"displayName": "Binary File",
"type": "boolean",
"default": false,
"description": "Whether the data to hashed should be taken from binary field",
"required": true,
"displayOptions": {
"show": {
"action": [
"hash",
"hmac"
]
}
}
},
{
"name": "binaryPropertyName",
"displayName": "Binary Property Name",
"type": "string",
"default": "data",
"description": "Name of the binary property which contains the input data",
"required": true,
"displayOptions": {
"show": {
"action": [
"hash",
"hmac"
],
"binaryData": [
true
]
}
}
},
{
"name": "value",
"displayName": "Value",
"type": "string",
"default": "",
"description": "The value that should be hashed",
"required": true,
"displayOptions": {
"show": {
"action": [
"hash"
],
"binaryData": [
false
]
}
}
},
{
"name": "dataPropertyName",
"displayName": "Property Name",
"type": "string",
"default": "data",
"description": "Name of the property to which to write the hash",
"required": true,
"displayOptions": {
"show": {
"action": [
"hash"
]
}
}
},
{
"name": "encoding",
"displayName": "Encoding",
"type": "options",
"default": "hex",
"required": true,
"options": [
{
"name": "BASE64",
"value": "base64"
},
{
"name": "HEX",
"value": "hex"
}
],
"displayOptions": {
"show": {
"action": [
"hash"
]
}
}
},
{
"name": "secret",
"displayName": "Secret",
"type": "string",
"default": "",
"required": true,
"displayOptions": {
"show": {
"action": [
"hmac"
]
}
}
},
{
"name": "algorithm",
"displayName": "Algorithm Name or ID",
"type": "options",
"default": "",
"description": "Choose from the list, or specify an ID using an <a href=\"https://docs.n8n.io/code/expressions/\">expression</a>",
"required": true,
"displayOptions": {
"show": {
"action": [
"sign"
]
}
}
},
{
"name": "privateKey",
"displayName": "Private Key",
"type": "string",
"default": "",
"description": "Private key to use when signing the string",
"required": true,
"displayOptions": {
"show": {
"action": [
"sign"
]
}
}
},
{
"name": "encodingType",
"displayName": "Type",
"type": "options",
"default": "uuid",
"description": "Encoding that will be used to generate string",
"required": true,
"options": [
{
"name": "ASCII",
"value": "ascii"
},
{
"name": "BASE64",
"value": "base64"
},
{
"name": "HEX",
"value": "hex"
},
{
"name": "UUID",
"value": "uuid"
}
],
"displayOptions": {
"show": {
"action": [
"generate"
]
}
}
},
{
"name": "stringLength",
"displayName": "Length",
"type": "number",
"default": 32,
"description": "Length of the generated string",
"displayOptions": {
"show": {
"action": [
"generate"
],
"encodingType": [
"ascii",
"base64",
"hex"
]
}
}
}
],
"credentialsConfig": [],
"io": {
"inputs": [
"Main"
],
"outputs": [
"Main"
],
"outputNames": [],
"hints": {}
},
"wiring": {
"role": "generic",
"requires": [],
"optional": [],
"consumedBy": [],
"consumes": [
"Main"
],
"produces": [
"Main"
]
}
}