From 54ece76c7e916aa919d9e5abaca69efd7c12968d Mon Sep 17 00:00:00 2001 From: Tykayn Date: Fri, 12 Feb 2021 12:35:29 +0100 Subject: [PATCH] hop --- .../ciphering/ciphering.component.html | 81 +++++++++++++------ 1 file changed, 56 insertions(+), 25 deletions(-) diff --git a/src/app/features/shared/components/ui/static-pages/ciphering/ciphering.component.html b/src/app/features/shared/components/ui/static-pages/ciphering/ciphering.component.html index 435fb44c..9a12a9fe 100644 --- a/src/app/features/shared/components/ui/static-pages/ciphering/ciphering.component.html +++ b/src/app/features/shared/components/ui/static-pages/ciphering/ciphering.component.html @@ -29,38 +29,69 @@

Comment on a fait?

Voici notre alphabet autorisé ( {{ alphab.length }} caractères): -
-			{{ alphab }}
-		
+
{{ alphab }}
Tout caractère qui n'est pas présent dans notre alphabet sera converti en souligné "_".
Notre texte après vérification : {{ filterCharacters(plainText) }}
On sépare le texte en {{ separatedCouples.length }} couples de caractères pour le mettre dans une matrice. On prend la pilule rouge. - - -
- - -
-					{{ c | json }}
-				
-
-
-		separatedCouples :
-			{{ separatedCouples | json }}
-		
+ [{{ c[0] }} , {{ c[1] }}] +
+ Pour chaque couple de caractères comme + [{{ separatedCouples[0][0] }} , {{ separatedCouples[0][1] }}] +
+ on crée le couple d'indices de ces caractères. + [ + {{ dico.indexOf(separatedCouples[0][0]) }} + , + {{ dico.indexOf(separatedCouples[0][1]) }} + ] +
+ On + + applique la matrice par produit + + + + {{ convertStringToMatrix(codingMatrice) }} + + au couple d'indices, ce qui donne: +
+ +
+ et on re convertit les indices en caractères selon notre dictionnaire. + +
+ on accumule ces lettres converties dans la chaine msgout et on obtient tout notre texte chiffré. + + {{ cipheredTextCIL }} +

1) Chiffrement simple