jwk: JSON web-keys

Description Usage Arguments Examples

Description

Read and write RSA, ECDSA or AES keys as JSON web keys.

Usage

1
2
3

Arguments

file

path to file with key data or literal json string

x

an RSA or EC key or pubkey file

path

file path to write output

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
# generate an ecdsa key
library(openssl)
key <- ec_keygen("P-521")
write_jwk(key)
write_jwk(as.list(key)$pubkey)

# Same for RSA
key <- rsa_keygen()
write_jwk(key)
write_jwk(as.list(key)$pubkey)

jeroen/jose documentation built on Nov. 11, 2021, 4:17 p.m.

Related to jwk in jeroen/jose...