Results of 1 - 10 of about 13 for plaintext (0.003 sec.)
- gnupg_decryptverify — 指定されたテキストを復号し、検証する | PHP 8.3 13179
- gnupg_decryptverify (PECL gnupg >= 0.2) gnupg_decryptverify — 指定されたテキストを復号し、検証する 説明 function gnupg_decryptverify ( resource $identifier , string $text , string &$plaintext ): array | false 指定したテキストを復号・検証し、
... の情報を返します。 パラメータ identifier gnupg_init() あるいは gnupg のコールで得られた gnupg ID。 text 復号したいテキスト。 plaintext plaintext には復号したテキストが格納されます。 戻り値 成功した場合、この関数は署名の情報を返し、復号されたテキストを plain ... text に保存します。 失敗した場合、この関数は false を返します。 例 例1 手続き型の gnupg_decryptverify() の例 <?php $plaintext = "" ; $res = gnupg_init (); gnupg_adddecryptkey ( $res , "8660281B6051D071D94B5B230549F9DC851566DC" , "test" ); $info = g ... nupg_decryptverify ( $res , $text , $plaintext ); print_r ( $info ); ?> 例2 オブジェクト指向の gnupg_decryptverify() の例 <?php $plaintext = "" ; $gpg = new gnupg (); $g ...
-
https://man.mtool.work/php/8.3/function.gnupg-decryptverify.html
- gnupg_verify — 署名済みテキストを検証する | PHP 8.3 10962
- gnupg_verify (PECL gnupg >= 0.1) gnupg_verify — 署名済みテキストを検証する 説明 function gnupg_verify ( resource $identifier , string $signed_text , string $signature , string &$plaintext = ? ): array | false 指定した signed_text を検証し、
... ned_text The signed text. signature 署名。clearsign で署名されたテキストを検証するには、 signature に false を設定します。 plaintext 平文テキスト。 このオプションのパラメータを渡すと、 復号されたテキストがそこに保存されます。 戻り値 成功した場合、この関数 ... は署名についての情報を返します。 失敗した場合、この関数は false を返します。 例 例1 手続き型の gnupg_verify() の例 <?php $plaintext = "" ; $res = gnupg_init (); // clearsigned $info = gnupg_verify ( $res , $signed_text , false , $plaintext ); print_r ( $ ... gnupg_verify ( $res , $signed_text , $signature ); print_r ( $info ); ?> 例2 オブジェクト指向の gnupg_verify() の例 <?php $plaintext = "" ; $gpg = new gnupg (); // clearsigned $info = $gpg -> verify ( $signed_text , false , $plaintext ); print_r ( $info ) ...
-
https://man.mtool.work/php/8.3/function.gnupg-verify.html
- openssl_encrypt — データを暗号化する | PHP 8.3 10099
- openssl_encrypt (PHP 5 >= 5.3.0, PHP 7, PHP 8) openssl_encrypt — データを暗号化する 説明 function openssl_encrypt ( #[ \SensitiveParameter ] string $data , string $cipher_algo , #[ \SensitiveParameter ] string $passphrase , int $options = 0
... 使う例 <?php //$key should have been previously generated in a cryptographically safe way, like openssl_random_pseudo_bytes $plaintext = "message to be encrypted" ; $cipher = "aes-128-gcm" ; if ( in_array ( $cipher , openssl_get_cipher_methods ())) { $ivlen ... = openssl_cipher_iv_length ( $cipher ); $iv = openssl_random_pseudo_bytes ( $ivlen ); $ciphertext = openssl_encrypt ( $plaintext , $cipher , $key , $options = 0 , $iv , $tag ); //store $cipher, $iv, and $tag for decryption later $original_plaintext = ... openssl_decrypt ( $ciphertext , $cipher , $key , $options = 0 , $iv , $tag ); echo $original_plaintext . "\n" ; } ?> 例2 PHP 7.1 より前のバージョンで、AES を使う例 <?php //$key previously generated safely, ie: openssl_random_ ...
-
https://man.mtool.work/php/8.3/function.openssl-encrypt.html
- sodium_crypto_box_seal — 匿名の公開鍵暗号による暗号化 | PHP 8.3 9589
- sodium_crypto_box_seal (PHP 7 >= 7.2.0, PHP 8) sodium_crypto_box_seal — 匿名の公開鍵暗号による暗号化 説明 function sodium_crypto_box_seal ( #[ \SensitiveParameter ] string $message , string $public_key ): string 受信側のみが復号できるやり方
... の例 <?php $keypair = sodium_crypto_box_keypair (); $public_key = sodium_crypto_box_publickey ( $keypair ); // Obfuscated plaintext to make the example more fun $plaintext_b64 = "V3JpdGluZyBzb2Z0d2FyZSBpbiBQSFAgY2FuIGJlIGEgZGVsaWdodCE=" ; $decoded_plaint ... ext = sodium_base642bin ( $plaintext_b64 , SODIUM_BASE64_VARIANT_ORIGINAL ); $sealed = sodium_crypto_box_seal ( $decoded_plaintext , $public_key ); var_dump ( ...
-
https://man.mtool.work/php/8.3/function.sodium-crypto-box-seal.html
- gnupg_encryptsign — 指定したテキストを暗号化し、署名する | PHP 8.3 8797
- gnupg_encryptsign (PECL gnupg >= 0.2) gnupg_encryptsign — 指定したテキストを暗号化し、署名する 説明 function gnupg_encryptsign ( resource $identifier , string $plaintext ): string | false 事前に gnupg_addsignkey および gnupg_addencryptkey で
... 設定したキーを使用し、指定した plaintext を暗号化・署名します。暗号化・署名済みのテキストを返します。 パラメータ identifier gnupg_init() あるいは gnupg のコールで得 ... られた gnupg ID。 plaintext 暗号化したいテキスト。 戻り値 成功した場合、この関数は暗号化されて署名されたテキストを返します。 失敗した場合、この関数は ...
-
https://man.mtool.work/php/8.3/function.gnupg-encryptsign.html
- gnupg_sign — 指定したテキストに署名する | PHP 8.3 8797
- gnupg_sign (PECL gnupg >= 0.1) gnupg_sign — 指定したテキストに署名する 説明 function gnupg_sign ( resource $identifier , string $plaintext ): string | false 事前に gnupg_addsignkey で設定したキーを使用して plaintext に署名し、 gnupg_setsign
... じて署名済みテキストあるいは署名を返します。 パラメータ identifier gnupg_init() あるいは gnupg のコールで得られた gnupg ID。 plaintext 署名したい平文テキスト。 戻り値 成功した場合、この関数は署名済みテキストあるいは署名を返します。 失敗した場合、この関数は ...
-
https://man.mtool.work/php/8.3/function.gnupg-sign.html
- mcrypt_encrypt — 指定したパラメータでプレーンテキストを暗号化する | PHP 8.3 8375
- mcrypt_encrypt (PHP 4 >= 4.0.2, PHP 5, PHP 7 < 7.2.0, PECL mcrypt >= 1.0.0) mcrypt_encrypt — 指定したパラメータでプレーンテキストを暗号化する 警告 この関数は PHP 7.1.0 で 非推奨 となり、PHP 7.2.0 で 削除 されました。この関数に頼らないことを
... 32 byte keys for AES-128, 192 # and 256 respectively $key_size = strlen ( $key ); echo "Key size: " . $key_size . "\n" ; $plaintext = "This string was AES-256 / CBC / ZeroBytePadding encrypted." ; # create a random IV to use with CBC encoding $iv_size = ... never ends with value 00h # (because of default zero padding) $ciphertext = mcrypt_encrypt ( MCRYPT_RIJNDAEL_128 , $key , $plaintext , MCRYPT_MODE_CBC , $iv ); # prepend the IV for it to be available for decryption $ciphertext = $iv . $ciphertext ; # enco ... size in the front) $ciphertext_dec = substr ( $ciphertext_dec , $iv_size ); # may remove 00h valued characters from end of plain text $plaintext_dec = mcrypt_decrypt ( MCRYPT_RIJNDAEL_128 , $key , $ciphertext_dec , MCRYPT_MODE_CBC , $iv_dec ); echo $plain ...
-
https://man.mtool.work/php/8.3/function.mcrypt-encrypt.html
- sodium_crypto_secretbox_open — 認証付きの共有鍵による復号 | PHP 8.3 8305
- sodium_crypto_secretbox_open (PHP 7 >= 7.2.0, PHP 8) sodium_crypto_secretbox_open — 認証付きの共有鍵による復号 説明 function sodium_crypto_secretbox_open ( string $ciphertext , string $nonce , #[ \SensitiveParameter ] string $key ): string
... ecretbox ( 'message to be encrypted' , $nonce , $key ); // The same nonce and key are required to decrypt the $ciphertext $plaintext = sodium_crypto_secretbox_open ( $ciphertext , $nonce , $key ); if ( $plaintext !== false ) { echo $plaintext . PHP_EOL ; ...
-
https://man.mtool.work/php/8.3/function.sodium-crypto-secretbox-open.html
- gnupg_encrypt — 指定したテキストを暗号化する | PHP 8.3 8005
- gnupg_encrypt (PECL gnupg >= 0.1) gnupg_encrypt — 指定したテキストを暗号化する 説明 function gnupg_encrypt ( resource $identifier , string $plaintext ): string | false 事前に gnupg_addencryptkey で設定したキーを使用し、指定されたテキストを暗
... 化します。暗号化された テキストを返します。 パラメータ identifier gnupg_init() あるいは gnupg のコールで得られた gnupg ID。 plaintext 暗号化したいテキスト。 戻り値 成功した場合、この関数は暗号化されたテキストを返します。 失敗した場合、この関数は false を返 ...
-
https://man.mtool.work/php/8.3/function.gnupg-encrypt.html
- sodium_crypto_secretbox — 認証付きの共有鍵による暗号化 | PHP 8.3 7724
- sodium_crypto_secretbox (PHP 7 >= 7.2.0, PHP 8) sodium_crypto_secretbox — 認証付きの共有鍵による暗号化 説明 function sodium_crypto_secretbox ( #[ \SensitiveParameter ] string $message , string $nonce , #[ \SensitiveParameter ] string $key )
... cretbox_keygen (); // Do not reuse $nonce with the same key $nonce = random_bytes ( SODIUM_CRYPTO_SECRETBOX_NONCEBYTES ); $plaintext = "message to be encrypted" ; $ciphertext = sodium_crypto_secretbox ( $plaintext , $nonce , $key ); var_dump ( bin2hex ( $ ...
-
https://man.mtool.work/php/8.3/function.sodium-crypto-secretbox.html