libsodium

Read encrypted php files using ajax

你说的曾经没有我的故事 提交于 2020-01-06 08:58:30
问题 I encrypt all my core files using libsodium, but my problem is how to read the php files in decrypted state like calling the file using ajax like automatic decryption. I'm not sure if its possible. Its something like this. Sorry, I'm still exploring on this library I work on this before but method is wrong, and told me to use libsodium. Hope you help me. ENCRYPTION <?php require_once('function.php'); if(isset($_FILES)){ $tmp = "enc/"; $tmpFiles = browseDir($tmp); foreach($tmpFiles as $file){

Read encrypted php files using ajax

这一生的挚爱 提交于 2020-01-06 08:58:28
问题 I encrypt all my core files using libsodium, but my problem is how to read the php files in decrypted state like calling the file using ajax like automatic decryption. I'm not sure if its possible. Its something like this. Sorry, I'm still exploring on this library I work on this before but method is wrong, and told me to use libsodium. Hope you help me. ENCRYPTION <?php require_once('function.php'); if(isset($_FILES)){ $tmp = "enc/"; $tmpFiles = browseDir($tmp); foreach($tmpFiles as $file){

Including Paragonie Halite in project doesn't find variables and functions

て烟熏妆下的殇ゞ 提交于 2020-01-04 06:12:36
问题 I've installed libsodium on Windows for PHP 7 and I'm developing my project with PHPStorm. I've also installed Halite from Paragonie which couldn't even be installable if the libsodium extension were not installed correctly. Also the IDE finds the used functions and when clicking on the variables and so on it opens up the fitting files of libsodium. But unfortunately in my setup I get the following error: Uncaught Error: Undefined constant 'Sodium\CRYPTO_PWHASH_OPSLIMIT_INTERACTIVE' in C:

Including Paragonie Halite in project doesn't find variables and functions

折月煮酒 提交于 2020-01-04 06:10:38
问题 I've installed libsodium on Windows for PHP 7 and I'm developing my project with PHPStorm. I've also installed Halite from Paragonie which couldn't even be installable if the libsodium extension were not installed correctly. Also the IDE finds the used functions and when clicking on the variables and so on it opens up the fitting files of libsodium. But unfortunately in my setup I get the following error: Uncaught Error: Undefined constant 'Sodium\CRYPTO_PWHASH_OPSLIMIT_INTERACTIVE' in C:

How to include libsodium.net on ASP.NET

懵懂的女人 提交于 2019-12-28 06:45:44
问题 I have an old webservice build on ASP.NET (using .asmx) files. I need to use sodium.net - unfortunately it fails while loading the dependent libsodium.dll file. Any ideas about what I make wrong? I have added libsodium.net through NuGet. I have renamed the 64 bit DLL to "libsodium.dll" (and other naming conventions too). I have tried to reference libsodium.dll directly but VS rejects it (not a valid DLL). So I have added it as "content" instead with "copy to output". After building I can see

PHP: Installing Libsodium to PHP v5.5

天大地大妈咪最大 提交于 2019-12-24 20:16:06
问题 How to correctly install Libsodium with PHP verson 5.5. I'm trying to follow the instruction on https://paragonie.com/book/pecl-libsodium/read/00-intro.md#installing-libsodium Here are the steps I did: Go to http://windows.php.net/downloads/pecl/releases/libsodium/1.0.6/ Download "php_libsodium-1.0.6-5.5-nts-vc11-x64.zip" and extract files. Copy "libsodium.dll" in my directory "C:\Program Files (x86)\PHP\v5.5" where is "php.exe" Copy "php_libsodium.dll" in my directory "C:\Program Files (x86)

Strange behavior of crypto_box_easy and crypto_box_open_easy. Decrypt without private key?

随声附和 提交于 2019-12-23 19:20:42
问题 I have tested Public-key-cryptography by libsodium and came across a strange behavior. The encrypted message is decrypted without the private key. Example from official site libsodium #include "sodium.h" #define MESSAGE "test" #define MESSAGE_LEN 4 #define CIPHERTEXT_LEN (crypto_box_MACBYTES + MESSAGE_LEN) static bool TestSodium() { unsigned char alice_publickey[crypto_box_PUBLICKEYBYTES]; unsigned char alice_secretkey[crypto_box_SECRETKEYBYTES]; crypto_box_keypair(alice_publickey, alice

libsodium + windows 10 x64 + Eclipse

只愿长相守 提交于 2019-12-23 03:40:56
问题 I'm struggling with getting Kalium wrapper for libsodium to work in Eclipse. My first attempt was not to use Maven. So I downloaded Kalium's Jar, downloaded x64 DLL of libsodium added it to win32 folder. Result? no luck: I got an error from the libsodium wrapper that it is unable to load a library. So I decided to go the official way... I didnt want to as it required maven which I wasn't using. so I installed maven. added Kalium to dependancied; installed Maven plugin for Eclipse. now when I

Libsodium-net - Unable to load DLL 'libsodium.dll

左心房为你撑大大i 提交于 2019-12-12 08:39:16
问题 I installed Libsodium-net through NuGet and am able to include Sodium in my classes, but when I try to run it, I get An exception of type 'System.DllNotFoundException' occurred in Sodium.dll but was not handled in user code Additional information: Unable to load DLL 'libsodium.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E) I am just trying to run the sample code from the gitbooks documentation https://bitbeans.gitbooks.io/libsodium-net/content/password

How to encrypt / decrypt AES with Libsodium-PHP

我与影子孤独终老i 提交于 2019-12-12 07:49:28
问题 I need to encrypt/decrypt data with PHP. I am completely new to this, however I have read that Libsodium-PHP is the best tool for AES encryption. Much like the other PHP encryption libraries I have researched Libsoduim-PHP seemed to offer almost no documentation of how to use the library (that I was able to find). Can anyone that has experience with PHP encryption either point me in the direction of a good learning resource or write a few lines of sample code using Libsoduim-PHP? Thank you