Files
Jon a5f90bf564 feat(Crypto Node): Add encryption and decryption actions (#30540)
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: Michael Kret <michael.k@radency.com>
2026-05-19 09:35:49 +00:00

72 lines
1.7 KiB
TypeScript

import type { ICredentialType, INodeProperties, Icon, ThemeIconColor } from 'n8n-workflow';
export class Crypto implements ICredentialType {
name = 'crypto';
displayName = 'Crypto';
documentationUrl = 'crypto';
icon: Icon = 'fa:key';
iconColor: ThemeIconColor = 'green';
properties: INodeProperties[] = [
{
displayName: 'Hmac Secret',
name: 'hmacSecret',
type: 'string',
description: 'Secret used in the Hmac action',
typeOptions: {
password: true,
},
default: '',
},
{
displayName: 'Private Key',
name: 'signPrivateKey',
type: 'string',
description: 'Private Key used in the Sign action',
typeOptions: {
rows: 4,
password: true,
},
default: '',
},
{
displayName: 'Encryption Passphrase',
name: 'encryptionPassphrase',
type: 'string',
description:
'Passphrase for symmetric Encrypt/Decrypt. Use 16+ random characters or a strong passphrase generated by a password manager.',
typeOptions: {
password: true,
},
default: '',
},
{
displayName: 'Encryption Public Key',
name: 'encryptionPublicKey',
type: 'string',
description:
'RSA public key (PEM, SPKI format) used by Encrypt in asymmetric mode. RSA-OAEP-SHA256 can only encrypt small payloads (~190 bytes with a 2048-bit key); use symmetric mode for larger data.',
typeOptions: {
rows: 4,
password: true,
},
default: '',
},
{
displayName: 'Encryption Private Key',
name: 'encryptionPrivateKey',
type: 'string',
description: 'RSA private key (PEM, PKCS#8 format) used by Decrypt in asymmetric mode',
typeOptions: {
rows: 4,
password: true,
},
default: '',
},
];
}