src/encoding/armor.js
function splitChecksum(text) {
  let body = text;
  let checksum = "";

  const lastEquals = text.lastIndexOf("=");

  if (lastEquals >= 0 && lastEquals !== text.length - 1) { // '=' as the last char means no checksum
    body = text.slice(0, lastEquals);
    checksum = text.slice(lastEquals + 1).substr(0, 4);
  }

  return { body: body, checksum: checksum };
}
function splitChecksum(text) {
  let body = text;
  let checksum = "";

  const lastEquals = text.lastIndexOf("=");

  if (lastEquals >= 0 && lastEquals !== text.length - 1) { // '=' as the last char means no checksum
    body = text.slice(0, lastEquals);
    checksum = text.slice(lastEquals + 1).substr(0, 4);
  }

  return { body: body, checksum: checksum };
}
function splitChecksum ( text ) { let body = text ; let checksum = "" ; const lastEquals = text . lastIndexOf ( "=" ) ; if ( lastEquals >= 0 && lastEquals !== text . length - 1 ) { // '=' as the last char means no checksum body = text . slice ( 0 , lastEquals ) ; checksum = text . slice ( lastEquals + 1 ) . substr ( 0 , 4 ) ; } return { body : body , checksum : checksum } ; }
Splits a message into two parts, the body and the checksum. This is an internal function
@param {String} text OpenPGP armored message part
@returns {Object} An object with attribute "body" containing the body
and an attribute "checksum" containing the checksum.
Splits a message into two parts the body and the checksum . This is an internal function