Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

formats.enarmor() is now printing newline at end

  • Loading branch information...
commit 300fe4b53a7ba4ca7080e27a1b49e52596eb7096 1 parent d9be2ae
@cdauth authored
Showing with 3 additions and 3 deletions.
  1. +1 −1  basicTypes.js
  2. +2 −2 formats.js
View
2  basicTypes.js
@@ -159,7 +159,7 @@ function getBase64EncodingStream(input)
var crcBuffer = new Buffer(3);
crcBuffer.writeUInt8((crc & 0xFF0000) >> 16, 0);
crcBuffer.writeUInt16BE(crc & 0xFFFF, 1);
- ret._sendData(new Buffer("="+crcBuffer.toString("base64"), "utf8"));
+ ret._sendData(new Buffer("="+crcBuffer.toString("base64")+"\r\n", "utf8"));
ret._endData();
return;
}
View
4 formats.js
@@ -127,7 +127,7 @@ function dearmor(input) {
*/
function enarmor(input, messageType) {
var ret = new BufferedStream();
- ret._sendData(new Buffer("-----BEGIN PGP "+messageType+"-----\r\nVersion: "+package.name+" "+package.version+"\r\n\r\n", "utf8"));
+ ret._sendData(new Buffer("-----BEGIN PGP "+messageType+"-----\r\nVersion: "+package.name+" v"+package.version+"\r\n\r\n", "utf8"));
basicTypes.getBase64EncodingStream(input).whilst(function(data, cb) {
ret._sendData(data);
@@ -137,7 +137,7 @@ function enarmor(input, messageType) {
ret._endData(err);
else
{
- ret._sendData(new Buffer("\r\n-----END PGP "+messageType+"-----", "utf8"));
+ ret._sendData(new Buffer("-----END PGP "+messageType+"-----\r\n", "utf8"));
ret._endData();
}
});
Please sign in to comment.
Something went wrong with that request. Please try again.