How to use the node-opcua-crypto.publicEncrypt_long function in node-opcua-crypto

To help you get started, we’ve selected a few node-opcua-crypto examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github node-opcua / node-opcua / packages / node-opcua-secure-channel / test_helpers / fake_message_chunk_factory.ts View on Github external
        encryptBufferFunc: (chunk: Buffer) => publicEncrypt_long(chunk, receiverPublicKey, 128, 11, RSA_PKCS1_PADDING),
        plainBlockSize: 128 - 11,
github node-opcua / node-opcua / packages / node-opcua-secure-channel / test_helpers / fake_message_chunk_factory.js View on Github external
encrypt_buffer: function (chunk) {
            return crypto_utils.publicEncrypt_long(chunk, receiverPublicKey, 128, 11);
        }
    };
github node-opcua / node-opcua / packages / node-opcua-secure-channel / source / security_policy.ts View on Github external
function RSAOAEP_Encrypt(buffer: Buffer, publicKey: PublicKeyPEM): Buffer {
    const keyLength = rsa_length(publicKey);
    return publicEncrypt_long(buffer, publicKey, keyLength, 42, RSA_PKCS1_OAEP_PADDING);
}
github node-opcua / node-opcua / packages / node-opcua-secure-channel / src / security_policy.js View on Github external
function RSAPKCS1V15_Encrypt(buffer, publicKey) {

    const key_length = crypto_utils.rsa_length(publicKey);
    return crypto_utils.publicEncrypt_long(buffer, publicKey, key_length, 11, crypto_utils.RSA_PKCS1_PADDING);
}
github node-opcua / node-opcua / packages / node-opcua-secure-channel / src / security_policy.js View on Github external
function RSAOAEP_Encrypt(buffer, publicKey) {
    const key_length = crypto_utils.rsa_length(publicKey);
    return crypto_utils.publicEncrypt_long(buffer, publicKey, key_length, 42, crypto_utils.RSA_PKCS1_OAEP_PADDING);
}
github node-opcua / node-opcua / packages / node-opcua-secure-channel / source / security_policy.ts View on Github external
function RSAPKCS1V15_Encrypt(buffer: Buffer, publicKey: PublicKeyPEM): Buffer {

    const keyLength = rsa_length(publicKey);
    return publicEncrypt_long(buffer, publicKey, keyLength, 11, RSA_PKCS1_PADDING);
}