Launch Week Day 1: Socket for Jira Is Now Available.Learn More
Socket
Book a DemoSign in
Socket

dkim-signer

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dkim-signer

DKIM signing code extracted from mailcomposer

latest
Source
npmnpm
Version
0.2.2
Version published
Weekly downloads
204K
6.38%
Maintainers
1
Weekly downloads
 
Created
Source

DKIM Signer

Sign RFC822 messages with DKIM. This module is extracted from mailcomposer.

Usage

// require signer function
var DKIMSign = require("dkim-signer").DKIMSign;

// generate a RFC822 message
var rfc822message = "Subject: test\r\n\r\nHello world";

// setup DKIM options
var dkimOptions = {
    domainName: "müriaad-polüteism.info",
    keySelector: "dkim",
    privateKey: require("fs").readFileSync("./test_private.pem")
};

// generate signature header field
var signature = DKIMSign(rfc822message, dkimOptions);

// join signature header field with the message
console.log(signature + "\r\n" + rfc822message);

License

MIT

Keywords

DKIM

FAQs

Package last updated on 02 Mar 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts