ciphers: some style clean-up for consistency

This commit is contained in:
Brandon Johnson 2022-07-23 20:51:04 -06:00
parent b2c68f1aac
commit 6c627c5589
3 changed files with 6 additions and 2 deletions

View File

@ -2,6 +2,7 @@
/**
* Encrypt given text using caesar cipher.
*
* @param string text text to be encrypted
* @param int shift number of shifts to be applied
* @return string new encrypted text

View File

@ -2,7 +2,9 @@
/**
* Encode text to Morse Code.
*
* @param string text to encode
* @return string encoded text
*/
function encode(string $text): string
{

View File

@ -1,5 +1,7 @@
<?php
/* The XOR cipher is a type of additive cipher.
/**
* The XOR cipher is a type of additive cipher.
* Each character is bitwise XORed with the key.
* We loop through the input string, XORing each
* character with the key.
@ -9,7 +11,6 @@
* @param string $key The key to use.
* @return string The encrypted string.
*/
*/
function xorCipher(string $input_string, string $key)
{