(armored)
| 281 | } |
| 282 | |
| 283 | export function getMessageType(armored) { |
| 284 | if (/(BEGIN|END)\sPGP\sMESSAGE/.test(armored)) { |
| 285 | return PGP_MESSAGE; |
| 286 | } else if (/BEGIN\sPGP\sSIGNED\sMESSAGE/.test(armored)) { |
| 287 | return PGP_SIGNATURE; |
| 288 | } else if (/END\sPGP\sSIGNATURE/.test(armored)) { |
| 289 | return PGP_SIGNATURE; |
| 290 | } else if (/(BEGIN|END)\sPGP\sPRIVATE\sKEY\sBLOCK/.test(armored)) { |
| 291 | return PGP_PRIVATE_KEY; |
| 292 | } else if (/(BEGIN|END)\sPGP\sPUBLIC\sKEY\sBLOCK/.test(armored)) { |
| 293 | return PGP_PUBLIC_KEY; |
| 294 | } |
| 295 | } |
| 296 | |
| 297 | function attachExtractFrame(ranges) { |
| 298 | // check status of PGP ranges |
no outgoing calls
no test coverage detected