<?php
$simple_string = "Welcome to Jungles\n";
echo " Text Asli : " . $simple_string;
$ciphering = "AES-128-CTR";
$iv_length = openssl_cipher_iv_length($ciphering);
$options = 0;
$encryption_iv = '1234567891011121';
$encryption_key = "Test!234";
$encryption = openssl_encrypt($simple_string, $ciphering,
$encryption_key, $options, $encryption_iv);
echo " 1. Encrypted String: " . $encryption . "\n";
$decryption_iv = '1234567891011121';
$decryption_key = "Test!234";
$decryption=openssl_decrypt ($encryption, $ciphering,
$decryption_key, $options, $decryption_iv);
echo " 2. Decrypted String: " . $decryption;
?>
Thursday, September 28, 2023
Encrypt Decrypt PHP OPEN SSL PHP
Subscribe to:
Post Comments (Atom)
Dunia Programmer: Setiap Orang Punya Spesialisasinya, Lebih dari Sekadar Frontend dan Backend
Ketika mendengar kata programmer, kebanyakan orang mungkin langsung membaginya menjadi dua kategori, yaitu Frontend Developer dan Backend De...
-
Dari Belajar Programming, Bisakah Kita Memahami Penciptaan Alam Semesta? Sabar dulu. Dari judulnya mungkin terdengar seperti saya akan memba...
-
< html lang = "en" > < head > < meta charset = "UTF-8" > < meta http-equiv = "X-UA-...
-
Barcode Generator Vanilla.js & Html < img id = "barcode" ></ img > < p >< button onclick = " down...
No comments:
Post a Comment