Suppose I create a key using R's cyphr library
library("cyphr")
k <- sodium::keygen()
# > k
# [1] af ee af 08 5b 75 42 7b 83 05 67 69 82 66 55 67 ea ee 04 76 90 cb b2 19 49 11 15 ab 53 5f e9 aa
key <- cyphr::key_sodium(k)
key
# > key
# <cyphr_key: sodium>
This seems to work OK.
Now suppose I never store this key in a file anywhere, but write it down on a piece of paper. When it comes time to decrypt a file I manually enter the key like so to try to recreate the sodium cyphr key object:
k <- "af ee af 08 5b 75 42 7b 83 05 67 69 82 66 55 67 ea ee 04 76 90 cb b2 19 49 11 15 ab 53 5f e9 aa"
key <- cyphr::key_sodium(noquote(k))
# Error in file(con, "rb") : cannot open the connection
# In addition: Warning message:
# In file(con, "rb") :
# cannot open file 'af ee af 08 5b 75 42 7b 83 05 67 69 82 66 55 67 ea ee 04 76 90 cb b2 19 49 11 15 ab 53 5f e9 aa': No such file or directory
Why doesn't this work? Can it work?