Skip to content

[help] encryption key always outdated #1342

Closed Answered by aryazand
aryazand asked this question in Help
Discussion options

You must be logged in to vote

Hi, thank you for the quick response!

It looks like with the code as is, if you modify pipeline you get the following error; Failed to decrypt key as session key has changed. It looks like cyphr load sessions specific keys by design. To get around this I changed how to key is loaded in the tar_hooks statements, as follows:

library(targets)
library(tarchetypes)
library(tidyverse)
library(here)
library(cyphr)

data_key_hash <- digest::digest(Sys.getenv("DATA_KEY"), algo = "sha512")

make_data <- function(){
  x <- as_tibble(airquality)
  return(x)
}

make_summary <- function(dataset) {
  dataset %>%
    janitor::clean_names() %>%
    group_by(month) %>%
    summarize()
}

setup <- list(
  t…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by aryazand
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants