encrypt | R Documentation |
Specify whether the message should be encrypted, signed or have a public key attached.
encrypt(msg, encrypt = TRUE, sign = TRUE, public_key = TRUE)
signature(msg, public_key = TRUE)
msg |
A message object. |
encrypt |
Whether to encrypt the message. If |
sign |
Whether to sign the message. If |
public_key |
Whether to attach a public key. If |
The signature()
function will add a digital signature to a message. It will
also optionally include a copy of the sender's public key.
The encrypt()
function will encrypt the contents of a message using the
public key(s) of the recipient(s). It can also add a digital signature to the
message (this is the default behaviour) and include a copy of the sender's
public key. Signing happens before encryption, so the digital signature
will only be accessible once the message has been decrypted. If a recipient
no longer has access to their private key or their email client is unable to
decrypt the message then they will not be able to access the message
contents.
A message object.
## Not run:
msg <- envelope(
from = "flotilla@kriegsmarine.gov",
to = "schunk@u-boat.com",
subject = "Top Secret Message",
text = "Immediate readiness. There are indications that the invasion has begun."
)
# Encrypt and sign the message.
msg %>% encrypt()
# Only encrypt the message.
msg %>% encrypt(sign = FALSE)
# Only sign the message.
msg %>% signature()
msg %>% encrypt(encrypt = FALSE)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.