sodium

Encrypt on frontend (sodium-plus.js) with public-key from backend (PHP sodium)

半城伤御伤魂 提交于 2020-07-09 07:11:19
问题 I would like to achieve an anonymous public-key encryption in a web browser using sodium-plus.js with keys generated in PHP sodium like this: $keyPair = sodium_crypto_box_keypair(); $privateKey = sodium_crypto_box_secretkey($keyPair); $publicKey = sodium_crypto_box_publickey($keyPair); The keys generated with this method work fine in PHP with the sodium_crypto_box_seal and sodium_crypto_box_seal_open methods, but however, I am unable to make it work on the frontend. My approach: <script type=

Encrypt on frontend (sodium-plus.js) with public-key from backend (PHP sodium)

我怕爱的太早我们不能终老 提交于 2020-07-09 07:10:46
问题 I would like to achieve an anonymous public-key encryption in a web browser using sodium-plus.js with keys generated in PHP sodium like this: $keyPair = sodium_crypto_box_keypair(); $privateKey = sodium_crypto_box_secretkey($keyPair); $publicKey = sodium_crypto_box_publickey($keyPair); The keys generated with this method work fine in PHP with the sodium_crypto_box_seal and sodium_crypto_box_seal_open methods, but however, I am unable to make it work on the frontend. My approach: <script type=

Encrypt on frontend (sodium-plus.js) with public-key from backend (PHP sodium)

最后都变了- 提交于 2020-07-09 07:09:47
问题 I would like to achieve an anonymous public-key encryption in a web browser using sodium-plus.js with keys generated in PHP sodium like this: $keyPair = sodium_crypto_box_keypair(); $privateKey = sodium_crypto_box_secretkey($keyPair); $publicKey = sodium_crypto_box_publickey($keyPair); The keys generated with this method work fine in PHP with the sodium_crypto_box_seal and sodium_crypto_box_seal_open methods, but however, I am unable to make it work on the frontend. My approach: <script type=

Keep values in data frame= Na (sodium in chemistry) as is

牧云@^-^@ 提交于 2020-03-23 07:56:00
问题 Original df (clinical chemistry) Subject Code Test Value Units Flag 1 NA NA 147 mmol/L 2 NA/K NA/K 10.5 RATIO 3 K K 4.7 mmol/L 4 CK CK 235 UL ... Ideal df after cleaning Subject Code Test Value Units Flag 1 NA Sodium 147 mmol/L NA 2 NA/K Sodium Potassium 10.5 RATIO NA 3 K Potassium 4.7 mmol/L NA 4 CK Creatine Kinase 235 UL NA ... What I have tried df <- read.csv(file="clinchemistry.csv", header = TRUE, sep=",", stringsAsFactors = FALSE) df$df[df8$Test == "NA"] <- "Sodium" df$df[df8$Code ==