Questions tagged [php-openssl]

Using this extension, PHP can use some OpenSSL functions to do direct encryption. This tag should not be used for questions about encrypting traffic(HTTPS)

The OpenSSL extension for PHP uses the functions of (OpenSSL) for generation and verification of signatures and for doing full encryption and decryption of data. This module does not support the full suite of OpenSSL functions, but does offer access to actively maintained encryption libraries as opposed to deprecated libraries like .

For hashing (one-way encryption) check out

405 questions
0
votes
1 answer

PHP Encrypt data with more than public key

I need to encrypt data asymmetrically (binary as well as text) with a public / private key system. Currently I'm using openssl_seal, because I need to encrypt the data with more than one public key. As a result I get an encrypted message (which is…
Hennes
  • 1,340
  • 1
  • 10
  • 26
0
votes
1 answer

enable php_openssl not working

Im trying to enable php_openssl but its not working, i kinda have the same problem as this question Enabling the OpenSSL in XAMPP in my php.ini there is no extension extension=php_openssl.dll but there was this OPENSSL_CONF…
Runshax
  • 117
  • 2
  • 13
0
votes
0 answers

using php-openssl create digital signature for docx

i need to create digital signature for fillable form.It means that when user fill the forms, he has to sign the doc. with his own private key and our server will check his private key using public key. I researched it but i couldnt find true answer.…
0
votes
3 answers

How can I encrypt and decrypt large string using private key and public key in php?

I want to encrypt large strings using public key and store in file. And after that read the contents of file and decrypt it using private key. How can I do that. Is there any default function or code available in php.
Kaushal Kumar
  • 1,237
  • 1
  • 12
  • 21
0
votes
4 answers

Call to undefined function openssl_public_encrypt() in PHP

I am using WAMP 2.4.4. To encrypt a String I used the "MyEncryption" class, but the error is: Call to undefined function openssl_public_encrypt() Is there any special library that i must add before using openssl_public_encrypt() class…
Sal-laS
  • 11,016
  • 25
  • 99
  • 169
0
votes
1 answer

Viewing the returned string of openssl_random_pseudo_bytes()

Why doesn't echo openssl_random_pseudo_bytes(12) print out anything but if I concatenate it with another string it does show the output? According to the manual the return type of openssl_random_pseudo_bytes is a string so why is there a problem? I…
Celeritas
  • 14,489
  • 36
  • 113
  • 194
-1
votes
1 answer

Encrypt large inputs in PHP using OpenSSL and a password-protected SSH key?

I have a CLI tool that writes encrypted data to the local filesystem that is never transmitted over the network. I am able to encrypt the data using a password-protected SSH key, but since the generated key is assymetric (RSA), it can only…
Lucas Bustamante
  • 15,821
  • 7
  • 92
  • 86
-1
votes
1 answer

AES-128-CBC algorithm: openssl_encrypt(): Using an empty Initialization Vector (iv) is potentially insecure and not recommended

public function encrypt($message){ $sifrelememetodu = "AES-128-CBC"; $benimsifrem = "birgul.091!birgul!"; $sifresicozulen = openssl_encrypt($message, $sifrelememetodu, $benimsifrem); return…
Cansu Koç
  • 11
  • 12
-1
votes
1 answer

(ftp://user:pass@hostname/path) stopped working after I implemented openssl

I own an online FTP using PHP and since mcrypt has been deprecated I wanted to switch to openssl to continue encrypting and storing user credentials as a cookie (deletes when the browser session ends). I know for a fact that the encryption process…
-1
votes
1 answer

PHP how to fix segmentation fault when call fclose?

I have Ubuntu 18.04, PHP CLI 7.2.2 ZTS. When I call the following code: I crashes not everytime, but sometimes. The $stream variable contains resource, opened by stream_socket_client function. if (is_resource($stream)) { fclose($stream); } I…
Mikael
  • 1,209
  • 1
  • 16
  • 47
-1
votes
1 answer

How to implement php's openssl_encrypt() method in iOS Objective-C?

I want to implement php's openssl_encrypt() method in iOS Objective-C. Therefore I tried this code: #import #import - (void)viewDidLoad { [super viewDidLoad]; …
reza_khalafi
  • 6,230
  • 7
  • 56
  • 82
-1
votes
1 answer

PHP extension calling another extension function

I'm writing a PHP extension and wanted to call openssl extension functions from my extension, to be specific, I want to call openssl_x509_read function from inside my extension. Is it possible? And how do I do it?
-1
votes
2 answers

php openssl sign file

I want to create a signature with openssl. I have an executable command like the following, but I don't know how to translate it to PHP. openssl cms -sign -inkey key.pem -signer signature.pem -outform DER -in xy.xml How to call this command in…
Irgendw Pointer
  • 1,770
  • 3
  • 30
  • 67
-2
votes
1 answer

openssl_encrypt(... string $method ...) Syntax

I couldn't find this information anywhere on here or on Google, so quick question: When using openssl_encrypt should I be using the actual cipher names (i.e. "bf-cbc") or can I use the aliases (i.e. "blowfish")? FWIW, I'm using PHP 5.6.34. Bonus…
oldboy
  • 5,729
  • 6
  • 38
  • 86
-3
votes
1 answer

Converting an AES256 Encryption algorithm in Java to PHP

Hi everyone i'm hitting a major roadblock with trying to integrate an API that uses AES256 encryption from a Java example to PHP, this is the Java version that is present in the documentation. package com.partner.carrier.library; import…
João Serra
  • 509
  • 9
  • 21
1 2 3
26
27