datawookie / emayili
Showing 3 of 4 files from the diff.

@@ -1,5 +1,6 @@
Loading
1 1
#' Encrypt message
2 2
#'
3 +
#' @inheritParams envelope
3 4
#' @inheritParams parties
4 5
#'
5 6
#' @return A message object.
@@ -77,7 +78,7 @@
Loading
77 78
    if (sign || public_key) {
78 79
      if (!("multipart_mixed" %in% class(content))) {
79 80
        log_debug("Convert message to multipart/mixed.")
80 -
        content <- emayili:::multipart_mixed(
81 +
        content <- multipart_mixed(
81 82
          children = list(content)
82 83
        )
83 84
      }
@@ -89,7 +90,7 @@
Loading
89 90
        public_key <- gpg::gpg_export(sender_fingerprint)
90 91
        log_debug("Done!")
91 92
        log_debug("Append public key.")
92 -
        content <- emayili:::append.MIME(content, application_pgp_keys(public_key))
93 +
        content <- append.MIME(content, application_pgp_keys(public_key))
93 94
      }
94 95
    }
95 96
@@ -98,22 +99,22 @@
Loading
98 99
    #
99 100
    if (sign) {
100 101
      log_debug("Write message to {TMPFILE}.")
101 -
      cat(emayili:::as.character.MIME(content), file = TMPFILE)
102 +
      cat(as.character.MIME(content), file = TMPFILE)
102 103
      log_debug("Sign message from {TMPFILE}.")
103 104
      signature <- gpg::gpg_sign(TMPFILE, sender_fingerprint, mode = "detach")
104 105
      log_debug("Done!")
105 106
      log_debug("Add signature.")
106 -
      signed <- emayili:::multipart_signed(
107 +
      signed <- multipart_signed(
107 108
        children = list(
108 109
          content,
109 -
          emayili:::application_pgp_signature(signature)
110 +
          application_pgp_signature(signature)
110 111
        )
111 112
      )
112 113
      log_debug("Write multipart/signed message to {TMPFILE}.")
113 -
      emayili:::as.character.MIME(signed) %>% writeLines(TMPFILE)
114 +
      as.character.MIME(signed) %>% writeLines(TMPFILE)
114 115
    } else {
115 116
      log_debug("Write message to {TMPFILE}.")
116 -
      emayili:::as.character.MIME(content) %>% writeLines(TMPFILE)
117 +
      as.character.MIME(content) %>% writeLines(TMPFILE)
117 118
    }
118 119
119 120
    # - Encrypt content from temporary file.
@@ -123,10 +124,10 @@
Loading
123 124
      log_debug("Encrypt message from {TMPFILE}.")
124 125
      encrypted <- gpg::gpg_encrypt(TMPFILE, recipients_fingerprint)
125 126
      log_debug("Done!")
126 -
      encrypted <- emayili:::multipart_encrypted(
127 +
      encrypted <- multipart_encrypted(
127 128
        children = list(
128 -
          emayili:::application_pgp_encrypted(),
129 -
          emayili:::application_octet_stream(
129 +
          application_pgp_encrypted(),
130 +
          application_octet_stream(
130 131
            encrypted,
131 132
            disposition = "inline",
132 133
            filename = "encrypted.asc"
@@ -134,7 +135,7 @@
Loading
134 135
        )
135 136
      )
136 137
      log_debug("Write multipart/encrypted message to {TMPFILE}.")
137 -
      emayili:::as.character.MIME(encrypted) %>% writeLines(TMPFILE)
138 +
      as.character.MIME(encrypted) %>% writeLines(TMPFILE)
138 139
    }
139 140
140 141
    log_debug("Read message from {TMPFILE}.")

@@ -123,11 +123,11 @@
Loading
123 123
#' @return A formatted message object.
124 124
as.character.envelope <- function(x, ..., details = TRUE) {
125 125
  message <- list(
126 -
    emayili:::headers(x)
126 +
    headers(x)
127 127
  )
128 128
129 129
  if (length(x$parts) > 1) {
130 -
    body <- emayili:::multipart_mixed(children = x$parts)
130 +
    body <- multipart_mixed(children = x$parts)
131 131
  } else {
132 132
    body <- x$parts[[1]]
133 133
  }

@@ -169,7 +169,7 @@
Loading
169 169
  if (!(micalg %in% LEVELS_MICALG)) stop('Invalid micalg: "{micalg}".')
170 170
  structure(
171 171
    c(
172 -
      emayili:::MIME(
172 +
      MIME(
173 173
        "This is an OpenPGP/MIME signed message (RFC 4880 and 3156).",
174 174
        protocol = "application/pgp-signature",
175 175
        type = glue('multipart/signed; micalg="{micalg}"'),
@@ -206,7 +206,7 @@
Loading
206 206
) {
207 207
  structure(
208 208
    c(
209 -
      emayili:::MIME(
209 +
      MIME(
210 210
        content,
211 211
        type = "application/pgp-signature",
212 212
        description = "OpenPGP digital signature",
@@ -228,7 +228,7 @@
Loading
228 228
) {
229 229
  structure(
230 230
    c(
231 -
      emayili:::MIME(
231 +
      MIME(
232 232
        content,
233 233
        type = "application/pgp-keys",
234 234
        description = "OpenPGP public key",
Files Coverage
R 97.54%
Project Totals (20 files) 97.54%

No yaml found.

Create your codecov.yml to customize your Codecov experience

Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading