write_pem | R Documentation |
The write_pem
functions exports a key or certificate to the standard
base64 PEM format. For private keys it is possible to set a password.
write_pem(x, path = NULL, password = NULL)
write_der(x, path = NULL)
write_pkcs1(x, path = NULL, password = NULL)
write_ssh(pubkey, path = NULL)
write_openssh_pem(key, path = NULL)
x |
a public/private key or certificate object |
path |
file to write to. If |
password |
string or callback function to set password (only applicable for private keys). |
pubkey |
a public key |
key |
a private key |
The pkcs1 format is the old legacy format used by OpenSSH. PKCS1 does not
support the new ed25519 keys, for which you need write_openssh_pem
.
For non-ssh clients, we recommend to simply use write_pem
to export keys
and certs into the recommended formats.
# Generate RSA keypair
key <- rsa_keygen()
pubkey <- key$pubkey
# Write to output formats
write_ssh(pubkey)
write_pem(pubkey)
write_pem(key, password = "super secret")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.