Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

API RequestDescriptionPHPCURL
encryption/systemEncryptEncrypts the given value using 256-bit AES in CBC mode using a SHA-256 HMAC hash as the key, based on the system configured setting in Blesta.system_key

 


Expand
titleShow Source
Code Block
languagephp
linenumberstrue
<?php

require_once "blesta_api.php";
 
$user =

 
$user = "username";

$key = "key";

$url = "https://yourdomain.com/installpath/api/";
 
$api = new

 
$api = new BlestaApi($url, $user, $key);
 
$response =

 
$response = $api->post("encryption", "systemEncrypt", array('value' => "my text"));
 

 
print_r($response->response());

print_r($response->errors());

?>

Expand
titleShow Source
curl https://yourdomain.com/installpath/api/encryption/systemEncrypt.json -u username:key -d 'value=my text'

How to Read the Source Docs

...