Created
October 6, 2016 07:57
-
-
Save alextverdyy/758212841f1f60a5224409daf4315303 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<component name="CopyrightManager"> | |
<settings default="" /> | |
</component> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<module type="WEB_MODULE" version="4"> | |
<component name="NewModuleRootManager"> | |
<content url="file://$MODULE_DIR$" /> | |
<orderEntry type="inheritedJdk" /> | |
<orderEntry type="sourceFolder" forTests="false" /> | |
</component> | |
</module> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<project version="4"> | |
<component name="ProjectLevelVcsManager" settingsEditedManually="false"> | |
<OptionsSetting value="true" id="Add" /> | |
<OptionsSetting value="true" id="Remove" /> | |
<OptionsSetting value="true" id="Checkout" /> | |
<OptionsSetting value="true" id="Update" /> | |
<OptionsSetting value="true" id="Status" /> | |
<OptionsSetting value="true" id="Edit" /> | |
<ConfirmationsSetting value="0" id="Add" /> | |
<ConfirmationsSetting value="0" id="Remove" /> | |
</component> | |
<component name="masterDetails"> | |
<states> | |
<state key="ScopeChooserConfigurable.UI"> | |
<settings> | |
<splitter-proportions> | |
<option name="proportions"> | |
<list> | |
<option value="0.1975" /> | |
</list> | |
</option> | |
</splitter-proportions> | |
</settings> | |
</state> | |
</states> | |
</component> | |
</project> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<project version="4"> | |
<component name="ProjectModuleManager"> | |
<modules> | |
<module fileurl="file://$PROJECT_DIR$/.idea/ejerciciosPHP.iml" filepath="$PROJECT_DIR$/.idea/ejerciciosPHP.iml" /> | |
</modules> | |
</component> | |
</project> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<project version="4"> | |
<component name="PhpProjectSharedConfiguration" php_language_level="5.4.0" /> | |
</project> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Created by PhpStorm. | |
* User: AlexTverdyy | |
* Date: 05/10/2016 | |
* Time: 8:44 | |
*/ | |
$criptado = array(); | |
$cadena = "Ernu n cyna dhoocuea on ,nqr l oudladmiau ebergM rrmaaceoe"; | |
$criptado2 = array(); | |
$longCadena = strlen($cadena); | |
for ($y = 1; $y < $longCadena; $y++) { | |
if ($longCadena % $y == 0){ | |
desencripta($y,($longCadena/$y),$cadena); | |
} | |
} | |
function desencripta($ancho, $alto, $cadena) | |
{ | |
$varMet = 0; | |
echo $alto."-".$ancho; | |
$varMet = 0; | |
$cadenaCriptada = $cadena; | |
for ($j = 0; $j < $ancho; $j++) { | |
for ($y = 0; $y < $alto; $y++) { | |
// echo $criptado[$y][$j]; | |
$criptado[$y][$j] = substr($cadenaCriptada, $varMet,1); | |
$varMet++; | |
} | |
} | |
echo "<br>"; | |
$cadDesencriptada = array(); | |
$varMet = 0; | |
for ($j = 0; $j < $ancho; $j++) { | |
for ($y = 0; $y < $alto; $y++) { | |
// echo $criptado[$y][$j]; | |
$cadDesencriptada[$j][$y] = substr($cadenaCriptada, $varMet, 1); | |
$varMet++; | |
} | |
} | |
$cadFinal = ""; | |
for ($j = 0; $j < $alto; $j++) { | |
for ($y = 0; $y < $ancho; $y++) { | |
// echo $criptado[$y][$j]; | |
$cadFinal .= $criptado[$j][$y]; | |
} | |
} | |
echo "<pre>".$cadFinal."</pre>"; | |
echo "<br>"; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment