From 76cb223088d0d780c826e872a9cedad0be676bea Mon Sep 17 00:00:00 2001 From: Hong Ooi Date: Wed, 24 Apr 2019 08:56:36 +1000 Subject: [PATCH] readme fix --- README.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 3134b2f..5bccbe1 100644 --- a/README.md +++ b/README.md @@ -36,7 +36,7 @@ kv$add_principal(svc, ## Client interface -The client interface is R6-based, with methods for keys, secrets and certificates. To access the vault, instantiate a new object of class `key_vault`. +The client interface is R6-based. To access the vault, instantiate a new object of class `key_vault`. This object includes sub-objects for interacting with keys, secrets, certificates and managed storage accounts. ```r vault <- key_vault$new("https://mykeyvault.vault.azure.net") @@ -46,8 +46,10 @@ vault <- kv$get_endpoint() # create a new secret -vault$secrets$create("newsecret", "secret value") -vault$secrets$get("newsecret") +vault$secrets$create("newsecret", "hidden text") +secret <- vault$secrets$get("newsecret") +secret$value +#> [1] "hidden text" # create a new RSA key with 4096-bit key size @@ -57,7 +59,7 @@ vault$keys$create("newkey", properties=key_properties(type="RSA", rsa_key_size=4 key <- vault$keys$get("newkey") plaintext <- "super secret" ciphertext <- key$encrypt(plaintext) -decrypted_text <- key$decrypt(ciphertext) +decrypted_text <- key$decrypt(ciphertext, as_raw=FALSE) plaintext == decrypted_text #> [1] TRUE