Read/ Write Power Encoded String

Partagez votre expérience de PureBasic avec les autres utilisateurs.
Guimauve
Messages : 1015
Inscription : mer. 11/févr./2004 0:32
Localisation : Québec, Canada

Read/ Write Power Encoded String

Message par Guimauve »

Bonjour à tous,

Puisque j'ai placé ce code sur le forum anglais, je le place ici également. Ce code ne me fera pas gagner de prix nobel ça c'est certain.

Principe de fonctionnement :

Chacun des caractères est élevé en alternance au carrée ou au cube avant écriture sur fichier. La chaine est reformé caractère par caractère avec la racine cubique ou carrée de la valeur lue dans le fichier.

A+
Guimauve

Code : Tout sélectionner

; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
; Project name : Read/ Write Power Encoded String
; File Name : ReadWritePowerEncodedString.pb
; File version : 1.0.0
; Programmation : OK
; Programmed by : Guimauve
; Date : 19-06-2010
; Mise à jour : 19-06-2010
; PureBasic cade : 4.50
; Plateform : Windows, Linux, MacOS X
; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
  
Procedure.q IntegerSquareRoot(Value.q)
  
  A.q = 0
  B.q = 6074000999
  Root.q = -1
  
  While A <= B
    
    D.q = (A + B) >> 1
    D1.q = D * D
    
    If Value > D1
      A = D + 1
    ElseIf Value < D1
      B = D - 1
    Else
      Root = D
      A = B + 1
    EndIf 
    
  Wend
  
  ProcedureReturn Root
EndProcedure 
  
Procedure.q IntegerCubicRoot(Value.q)
  
  A.q = 0
  B.q = 4194303
  Root.q = -1
  
  While A <= B
    
    D.q = (A + B) >> 1
    D1.q = D * D * D
    
    If Value > D1
      A = D + 1
    ElseIf Value < D1
      B = D - 1
    Else
      Root = D
      A = B + 1
    EndIf 
    
  Wend
  
  ProcedureReturn Root
EndProcedure 
  
; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
; <<<<< Écriture sur fichier binaire <<<<<
  
Procedure WritePowerEncodedString(FileID.l, String.s)
  
  StringLen.l = Len(String)
  *Source.CHARACTER = @String
  
  WriteLong(FileID, StringLen)
  
  For Index = 1 To StringLen
    
    Char01.c = PeekC(*Source)
    *Source + SizeOf(CHARACTER)
    
    If Index % 2 = 0
      WriteQuad(FileID, Char01 * Char01 * Char01)
    Else 
      WriteQuad(FileID, Char01 * Char01)
    EndIf 
    
  Next
  
EndProcedure 
  
; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
; <<<<< Lecture sur fichier binaire <<<<<
  
Procedure.s ReadPowerEncodedString(FileID.l)
  
  StringLen.l = ReadLong(FileID)
  String.s = Space(StringLen)
  *Source.CHARACTER = @String
  
  For Index = 1 To StringLen
    
    If Index % 2 = 0
      Char01.c = IntegerCubicRoot(ReadQuad(FileID))
    Else 
      Char01 = IntegerSquareRoot(ReadQuad(FileID))
    EndIf 
    
    PokeC(*Source, Char01)
    *Source + SizeOf(CHARACTER)
    
  Next
  
  ProcedureReturn String
EndProcedure 
  
; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
; <<<<< !!! WARNING - TESTING CODE !!! <<<<<
; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
  
Dim Texte.s(5)
  
Texte(0) = FormatDate("A=%yyyy, M= %mm, J=%dd - %hh:%ii:%ss", Date())
Texte(1) = "PureBasic 4.50 RC2"
Texte(2) = "FreeMat 4.0 (Similiaire à MatLab mais sans Simulink)"
Texte(3) = "Feel the Pure Power !"
Texte(4) = "PureBasic is the best programming language, period !"
Texte(5) = "Linux Ubuntu 10.04 LTS x86_64"
  
If CreateFile(0, "Test Power Encode.dat")
  
  For Index = 0 To 5
    WritePowerEncodedString(0, Texte(Index))
  Next
  
  CloseFile(0)
EndIf 

If ReadFile(1, "Test Power Encode.dat")
  
  For Index = 0 To 5
    Debug Texte(Index)
    Debug ReadPowerEncodedString(1)
    Debug ""
  Next
  
  CloseFile(1)
EndIf 
  
; <<<<<<<<<<<<<<<<<<<<<<<
; <<<<< END OF FILE <<<<<
; <<<<<<<<<<<<<<<<<<<<<<<
Avatar de l’utilisateur
SPH
Messages : 4947
Inscription : mer. 09/nov./2005 9:53

Re: Read/ Write Power Encoded String

Message par SPH »

Puis-je emettre une critique constructive ? :idea:
Oui, alors voila : ta "protection" ne tiens pas une seule micro seconde a la cryptanalyse...

!i!i!i!i!i!i!i!i!i!
!i!i!i!i!i!i!
!i!i!i!
//// Informations ////
Intel Core i7 4770 64 bits - GTX 650 Ti
Version de PB : 6.12LTS- 64 bits
lepiaf31
Messages : 510
Inscription : dim. 25/mars/2007 13:44
Localisation : Toulouse, France
Contact :

Re: Read/ Write Power Encoded String

Message par lepiaf31 »

Qui a dit que c'etait une protection ? xD
Avatar de l’utilisateur
SPH
Messages : 4947
Inscription : mer. 09/nov./2005 9:53

Re: Read/ Write Power Encoded String

Message par SPH »

lepiaf31 a écrit :Qui a dit que c'etait une protection ? xD
Ca :
; Project name : Read/ Write Power Encoded String
; File Name : ReadWritePowerEncodedString.pb
...car en general, on crypte pour proteger...

!i!i!i!i!i!i!i!i!i!
!i!i!i!i!i!i!
!i!i!i!
//// Informations ////
Intel Core i7 4770 64 bits - GTX 650 Ti
Version de PB : 6.12LTS- 64 bits
Avatar de l’utilisateur
flaith
Messages : 1487
Inscription : jeu. 07/avr./2005 1:06
Localisation : Rennes
Contact :

Re: Read/ Write Power Encoded String

Message par flaith »

SPH a écrit :
lepiaf31 a écrit :Qui a dit que c'etait une protection ? xD
Ca :
; Project name : Read/ Write Power Encoded String
; File Name : ReadWritePowerEncodedString.pb
...car en general, on crypte pour proteger...
il y a une grande différence entre "chaîne codée" et "chaîne cryptée"
lepiaf31
Messages : 510
Inscription : dim. 25/mars/2007 13:44
Localisation : Toulouse, France
Contact :

Re: Read/ Write Power Encoded String

Message par lepiaf31 »

flaith a écrit :
il y a une grande différence entre "chaîne codée" et "chaîne cryptée"
+1
Par exemple, les Urls sont encodées, (les caractère spéciaux deviennent des %xx par exemple), mais cela n'est pas fait pour proteger quoi que ce soit.
Avatar de l’utilisateur
SPH
Messages : 4947
Inscription : mer. 09/nov./2005 9:53

Re: Read/ Write Power Encoded String

Message par SPH »

Faudra m'expliquer a quoi ca sert... :?: :idea:

!i!i!i!i!i!i!i!i!i!
!i!i!i!i!i!i!
!i!i!i!
//// Informations ////
Intel Core i7 4770 64 bits - GTX 650 Ti
Version de PB : 6.12LTS- 64 bits
lepiaf31
Messages : 510
Inscription : dim. 25/mars/2007 13:44
Localisation : Toulouse, France
Contact :

Re: Read/ Write Power Encoded String

Message par lepiaf31 »

Ben a avoir des données "propres". (Facon de parler). Tu as par exemple le système Base64 qui permet d'encoder des données sous forme de caractères LISIBLES (d'où l'intérêt d'un codage). Lien wikipédia: http://fr.wikipedia.org/wiki/Base64 .
Cela peut également servir à coder certains caractères spéciaux par exemple, qui peuvent poser problème.
Guimauve
Messages : 1015
Inscription : mer. 11/févr./2004 0:32
Localisation : Québec, Canada

Re: Read/ Write Power Encoded String

Message par Guimauve »

SPH a écrit :Faudra m'expliquer a quoi ca sert... :?: :idea:
Ça sert juste à écrire autre chose que des chaine de caractère dans un fichier. Par exemple on voudrait enregistrer la structure suivante dans un fichier binaire :

Code : Tout sélectionner

Structure Player
  
   Name.s
   Callsign.s
   Score.l
   Skill.b
   
EndStructure
Le strict minimum est de faire comme ceci :

Code : Tout sélectionner

Procedure WritePlayer(FileID, *PlayerA.Player)
  
  WriteLong(FileID, Len(*PlayerA\Name))
  WriteData(FileID, @*PlayerA\Name, Len(*PlayerA\Name))
  WriteLong(FileID, Len(*PlayerA\Callsign))
  WriteData(FileID, @*PlayerA\Callsign, Len(*PlayerA\Callsign))
  WriteLong(FileID, *PlayerA\Score)
  WriteByte(FileID, *PlayerA\Skill)
  
EndProcedure 
  
Procedure ReadPlayer(FileID, *PlayerA.Player)
  
  *PlayerA\Name = Space(ReadLong(FileID))
  ReadData(FileID, @*PlayerA\Name, Len(*PlayerA\Name))  
  *PlayerA\Callsign = Space(ReadLong(FileID))
  ReadData(FileID, @*PlayerA\Callsign, Len(*PlayerA\Callsign))
  *PlayerA\Score = ReadLong(FileID)
  *PlayerA\Skill = ReadByte(FileID)
  
EndProcedure 
Le seul emmerdement est que si on ouvre le fichier avec Bloc-Notes on peut lire facilement les chaînes écrites et changer le texte mais si on ne change pas la valeur indiquant la longueur de la chaine, le chargement va planter solide. Ce que je cherche à faire est simple, c'est de rendre illisible les textes écris dans le fichier. L'idée n'est d'avoir la super sécurité de la mort qui tue à coup d'engin de destruction massif alors pourquoi se priver de faire comme ceci :

Code : Tout sélectionner

Procedure ReadPlayer(FileID.l, *PlayerA.Player)
  
  *PlayerA\Name = ReadPowerEncodedString(FileID)
  *PlayerA\Callsign = ReadPowerEncodedString(FileID)
  *PlayerA\Score = ReadLong(FileID)
  *PlayerA\Skill = ReadByte(FileID)
  
EndProcedure
  
Procedure WritePlayer(FileID.l, *PlayerA.Player)
  
  WritePowerEncodedString(FileID, *PlayerA\Name)
  WritePowerEncodedString(FileID, *PlayerA\Callsign)
  WriteLong(FileID, *PlayerA\Score)
  WriteByte(FileID, *PlayerA\Skill)
  
EndProcedure
Je me permets de demander d'aller voir le code sur ce post pour tout ce qui est question de sécurité.

http://www.purebasic.fr/french/viewtopic.php?f=6&t=9018

À 8192 bits avec une clé de 1024 caractères, cela va prendre tellement de temps que le soleil va avoir le temps de s'éteindre avant que quiconque passe à travers.

Un dernier point, si un code semble ne pas être intéressant pour toi, laisse le tomber et passe à un autre.

Et là je donne un grand coup de variation sur un même theme :

Code : Tout sélectionner

#BINARY_STRING_OFFSET = 999999
  
; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<
; <<<<< WriteBinaryString <<<<<
    
Procedure WriteBinaryString(FileID.l, String.s)
  
  StringLen.l = Len(String)
  WriteLong(FileID, StringLen)
  *Source.CHARACTER = @String
  
  For Index = 1 To StringLen
    WriteLong(FileID, #BINARY_STRING_OFFSET + PeekC(*Source))
    *Source + SizeOf(CHARACTER)
  Next
  
EndProcedure
  
; <<<<<<<<<<<<<<<<<<<<<<<<<<<<
; <<<<< ReadBinaryString <<<<<
  
Procedure.s ReadBinaryString(FileID.l)
  
  StringLen.l = ReadLong(FileID)
  String.s = Space(StringLen)
  *Source.CHARACTER = @String
  
  For Index = 1 To StringLen
    PokeC(*Source, ReadLong(FileID) - #BINARY_STRING_OFFSET)
    *Source + SizeOf(CHARACTER)
  Next
  
  ProcedureReturn String
EndProcedure

Code : Tout sélectionner

; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
; Fusion et Extraction des parties d'un Quad
  
Macro MakeQuad(HiLong, LoLong)

  ((HiLong << 32) + LoLong)
  
EndMacro
  
Macro ExtractQuadHiLong(Quad)
  
  ((Quad >> 32) & $FFFFFFFF)
  
EndMacro
  
Macro ExtractQuadLoLong(Quad)
  
  (Quad & $FFFFFFFF)
  
EndMacro
  
; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
; <<<<< Écriture sur fichier binaire <<<<<
  
Procedure WriteLightEncodedString(FileID.l, String.s)
  
  StringLen.l = Len(String)
  *Source.CHARACTER = @String
  
  Plus.l = 100 + Random(16000)
  
  If Plus % 2 = 0
    Dummy00.l = 0
    Dummy01.l = Plus
  Else
    Dummy00 = Plus
    Dummy01 = 0
  EndIf 

  WriteLong(FileID, StringLen)
  WriteQuad(FileID, MakeQuad(Dummy00, Dummy01))
  
  For Index = 1 To StringLen
    
    Char01.l = PeekC(*Source) + Plus
    *Source + SizeOf(CHARACTER)

    If Char01 > 65535 
      Char01 = Char01 - 65535
    EndIf 

    WriteLong(FileID, Char01)

  Next 
  
EndProcedure 
  
; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
; <<<<< Lecture sur fichier binaire <<<<<
  
Procedure.s ReadLightEncodedString(FileID.l)
  
  StringLen.l = ReadLong(FileID)
  String.s = Space(StringLen)
  *Source.CHARACTER = @String
  
  Dummy00_01.q = ReadQuad(FileID)
  
  Dummy00.l = ExtractQuadHiLong(Dummy00_01)
  Dummy01.l = ExtractQuadLoLong(Dummy00_01)
  
  If Dummy00 = 0
    Minus.w = Dummy01
  Else
    Minus.w = Dummy00
  EndIf 
  
  For Index = 1 To StringLen
    
    Char01.l = ReadLong(FileID) - Minus
    
    If Char01 < 0 
      Char01 = Char01 + 65535 
    EndIf 
    
    PokeC(*Source, Char01)
    *Source + SizeOf(CHARACTER)
    
  Next 
  
  ProcedureReturn String
EndProcedure 

Code : Tout sélectionner

#RANDOM_ENCODED_STRING_MAX_RND = 15
#RANDOM_ENCODED_STRING_PRESET = 127 
  
Procedure WriteRandomEncodedString(FileID.l, String.s)
	
	Max = Len(String)
	WriteLong(FileID, Max)
	*Source.CHARACTER = @String
	
	For Index = 1 To Max
		
		If Index = 1 
			PrevASCII.l = #RANDOM_ENCODED_STRING_PRESET 
		Else 
			PrevASCII.l = ASCII.l
		EndIf 
		
		ASCII = PeekC(*Source)
		*Source + SizeOf(CHARACTER)
		
		Num_01.l = Random(#RANDOM_ENCODED_STRING_PRESET - 1) + 1 
		Num_02.l = (255 + PrevASCII - ASCII) * Num_01 
		Num_01 = (Random(100) * (#RANDOM_ENCODED_STRING_PRESET + 1)) + Num_01 
		Value.l = Num_02 + (Num_01 << 16)
		WriteLong(FileID, Value)
		
	Next 
	
EndProcedure 
	
Procedure.s ReadRandomEncodedString(FileID.l)
	
	StartASCII.l = #RANDOM_ENCODED_STRING_PRESET
	Max = ReadLong(FileID)
	Decoded.s = Space(Max)
	*Source.CHARACTER = @Decoded
	
	For Index = 1 To Max
		
		Value.l = ReadLong(FileID)     
		Num_01.l = Value >> 16
		Num_02.l = Value & $FFFF 
		Num_01 = Mod(Num_01, #RANDOM_ENCODED_STRING_PRESET + 1) 
		Num_02 = (Num_02 / Num_01) - 255 
		StartASCII - Num_02 
		
		PokeC(*Source, StartASCII)
    *Source + SizeOf(CHARACTER)
		
	Next 
	
	ProcedureReturn Decoded
EndProcedure 

Code : Tout sélectionner

; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
; <<<<< Déclaration de la Structure <<<<<
  
Structure Vector3L
  
  i.l
  j.l
  k.l
  
EndStructure
  
; <<<<<<<<<<<<<<<<<<<<<<<<<<<<
; <<<<< Les observateurs <<<<<
  
Macro GetVector3Li(VectorA)
  
  VectorA\i
  
EndMacro
  
Macro GetVector3Lj(VectorA)
  
  VectorA\j
  
EndMacro
  
Macro GetVector3Lk(VectorA)
  
  VectorA\k
  
EndMacro
  
; <<<<<<<<<<<<<<<<<<<<<<<<<
; <<<<< Les mutateurs <<<<<
  
Macro SetVector3Li(VectorA, P_i)
  
  GetVector3Li(VectorA) = P_i
  
EndMacro
  
Macro SetVector3Lj(VectorA, P_j)
  
  GetVector3Lj(VectorA) = P_j
  
EndMacro
  
Macro SetVector3Lk(VectorA, P_k)
  
  GetVector3Lk(VectorA) = P_k
  
EndMacro
  
; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
; <<<<< Lecture sur fichier Binaire <<<<<
  
Macro ReadVector3L(FileID, VectorA)
  
  ReadData(FileID, VectorA, SizeOf(Vector3L))
  
EndMacro
  
; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
; <<<<< Écriture sur fichier Binaire <<<<<
  
Macro WriteVector3L(FileID, VectorA)
  
  WriteData(FileID, VectorA, SizeOf(Vector3L))
  
EndMacro
  
; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
; <<<<< Déclaration de la Structure <<<<<
  
Structure Vector4L
  
  i.l
  j.l
  k.l
  l.l
  
EndStructure
  
; <<<<<<<<<<<<<<<<<<<<<<<<<<<<
; <<<<< Les observateurs <<<<<
  
Macro GetVector4Li(VectorA)
  
  VectorA\i
  
EndMacro
  
Macro GetVector4Lj(VectorA)
  
  VectorA\j
  
EndMacro
  
Macro GetVector4Lk(VectorA)
  
  VectorA\k
  
EndMacro
  
Macro GetVector4Ll(VectorA)
  
  VectorA\l
  
EndMacro
  
; <<<<<<<<<<<<<<<<<<<<<<<<<
; <<<<< Les mutateurs <<<<<
  
Macro SetVector4Li(VectorA, P_i)
  
  GetVector4Li(VectorA) = P_i
  
EndMacro
  
Macro SetVector4Lj(VectorA, P_j)
  
  GetVector4Lj(VectorA) = P_j
  
EndMacro
  
Macro SetVector4Lk(VectorA, P_k)
  
  GetVector4Lk(VectorA) = P_k
  
EndMacro
  
Macro SetVector4Ll(VectorA, P_l)
  
  GetVector4Ll(VectorA) = P_l
  
EndMacro
  
; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
; <<<<< Lecture sur fichier Binaire <<<<<
  
Macro ReadVector4L(FileID, VectorA)
  
  ReadData(FileID, VectorA, SizeOf(Vector4L))
  
EndMacro
  
; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
; <<<<< Écriture sur fichier Binaire <<<<<
  
Macro WriteVector4L(FileID, VectorA)
  
  WriteData(FileID, VectorA, SizeOf(Vector4L))
  
EndMacro
  
; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
; <<<<< Déclaration de la Structure <<<<<
  
Structure Matrix33L
  
  e11.l
  e12.l
  e13.l
  e21.l
  e22.l
  e23.l
  e31.l
  e32.l
  e33.l
  
EndStructure
  
; <<<<<<<<<<<<<<<<<<<<<<<<<<<<
; <<<<< Les observateurs <<<<<
  
Macro GetMatrix33Le11(MatrixA)
  
  MatrixA\e11
  
EndMacro
  
Macro GetMatrix33Le12(MatrixA)
  
  MatrixA\e12
  
EndMacro
  
Macro GetMatrix33Le13(MatrixA)
  
  MatrixA\e13
  
EndMacro
  
Macro GetMatrix33Le21(MatrixA)
  
  MatrixA\e21
  
EndMacro
  
Macro GetMatrix33Le22(MatrixA)
  
  MatrixA\e22
  
EndMacro
  
Macro GetMatrix33Le23(MatrixA)
  
  MatrixA\e23
  
EndMacro
  
Macro GetMatrix33Le31(MatrixA)
  
  MatrixA\e31
  
EndMacro
  
Macro GetMatrix33Le32(MatrixA)
  
  MatrixA\e32
  
EndMacro
  
Macro GetMatrix33Le33(MatrixA)
  
  MatrixA\e33
  
EndMacro
  
; <<<<<<<<<<<<<<<<<<<<<<<<<
; <<<<< Les mutateurs <<<<<
  
Macro SetMatrix33Le11(MatrixA, P_e11)
  
  GetMatrix33Le11(MatrixA) = P_e11
  
EndMacro
  
Macro SetMatrix33Le12(MatrixA, P_e12)
  
  GetMatrix33Le12(MatrixA) = P_e12
  
EndMacro
  
Macro SetMatrix33Le13(MatrixA, P_e13)
  
  GetMatrix33Le13(MatrixA) = P_e13
  
EndMacro
  
Macro SetMatrix33Le21(MatrixA, P_e21)
  
  GetMatrix33Le21(MatrixA) = P_e21
  
EndMacro
  
Macro SetMatrix33Le22(MatrixA, P_e22)
  
  GetMatrix33Le22(MatrixA) = P_e22
  
EndMacro
  
Macro SetMatrix33Le23(MatrixA, P_e23)
  
  GetMatrix33Le23(MatrixA) = P_e23
  
EndMacro
  
Macro SetMatrix33Le31(MatrixA, P_e31)
  
  GetMatrix33Le31(MatrixA) = P_e31
  
EndMacro
  
Macro SetMatrix33Le32(MatrixA, P_e32)
  
  GetMatrix33Le32(MatrixA) = P_e32
  
EndMacro
  
Macro SetMatrix33Le33(MatrixA, P_e33)
  
  GetMatrix33Le33(MatrixA) = P_e33
  
EndMacro
  
; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
; <<<<< Les mutateurs ligne par ligne <<<<<
 
Macro SetMatrix33LLine1(MatrixA, P_e11, P_e12, P_e13)
  
  SetMatrix33Le11(MatrixA, P_e11)
  SetMatrix33Le12(MatrixA, P_e12)
  SetMatrix33Le13(MatrixA, P_e13)
  
EndMacro
  
Macro SetMatrix33LLine2(MatrixA, P_e21, P_e22, P_e23)
  
  SetMatrix33Le21(MatrixA, P_e21)
  SetMatrix33Le22(MatrixA, P_e22)
  SetMatrix33Le23(MatrixA, P_e23)
  
EndMacro
  
Macro SetMatrix33LLine3(MatrixA, P_e31, P_e32, P_e33)
  
  SetMatrix33Le31(MatrixA, P_e31)
  SetMatrix33Le32(MatrixA, P_e32)
  SetMatrix33Le33(MatrixA, P_e33)
  
EndMacro
  
; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
; <<<<< L'opérateur Product Matrix Vector : R = A * B <<<<<
  
Macro ProductMatrix33LVector3L(VectorR, MatrixA, VectorB)
  
  SetVector3Li(VectorR, GetMatrix33Le11(MatrixA) * GetVector3Li(VectorB) + GetMatrix33Le12(MatrixA) * GetVector3Lj(VectorB) + GetMatrix33Le13(MatrixA) * GetVector3Lk(VectorB))
  SetVector3Lj(VectorR, GetMatrix33Le21(MatrixA) * GetVector3Li(VectorB) + GetMatrix33Le22(MatrixA) * GetVector3Lj(VectorB) + GetMatrix33Le23(MatrixA) * GetVector3Lk(VectorB))
  SetVector3Lk(VectorR, GetMatrix33Le31(MatrixA) * GetVector3Li(VectorB) + GetMatrix33Le32(MatrixA) * GetVector3Lj(VectorB) + GetMatrix33Le33(MatrixA) * GetVector3Lk(VectorB))
  
EndMacro 
  
; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
; <<<<< Déclaration de la Structure <<<<<
  
Structure Matrix44L
  
  e11.l
  e21.l
  e31.l
  e41.l
  e12.l
  e22.l
  e32.l
  e42.l
  e13.l
  e23.l
  e33.l
  e43.l
  e14.l
  e24.l
  e34.l
  e44.l
  
EndStructure
  
; <<<<<<<<<<<<<<<<<<<<<<<<<<<<
; <<<<< Les observateurs <<<<<
  
Macro GetMatrix44Le11(MatrixA)
  
  MatrixA\e11
  
EndMacro
  
Macro GetMatrix44Le21(MatrixA)
  
  MatrixA\e21
  
EndMacro
  
Macro GetMatrix44Le31(MatrixA)
  
  MatrixA\e31
  
EndMacro
  
Macro GetMatrix44Le41(MatrixA)
  
  MatrixA\e41
  
EndMacro
  
Macro GetMatrix44Le12(MatrixA)
  
  MatrixA\e12
  
EndMacro
  
Macro GetMatrix44Le22(MatrixA)
  
  MatrixA\e22
  
EndMacro
  
Macro GetMatrix44Le32(MatrixA)
  
  MatrixA\e32
  
EndMacro
  
Macro GetMatrix44Le42(MatrixA)
  
  MatrixA\e42
  
EndMacro
  
Macro GetMatrix44Le13(MatrixA)
  
  MatrixA\e13
  
EndMacro
  
Macro GetMatrix44Le23(MatrixA)
  
  MatrixA\e23
  
EndMacro
  
Macro GetMatrix44Le33(MatrixA)
  
  MatrixA\e33
  
EndMacro
  
Macro GetMatrix44Le43(MatrixA)
  
  MatrixA\e43
  
EndMacro
  
Macro GetMatrix44Le14(MatrixA)
  
  MatrixA\e14
  
EndMacro
  
Macro GetMatrix44Le24(MatrixA)
  
  MatrixA\e24
  
EndMacro
  
Macro GetMatrix44Le34(MatrixA)
  
  MatrixA\e34
  
EndMacro
  
Macro GetMatrix44Le44(MatrixA)
  
  MatrixA\e44
  
EndMacro
  
; <<<<<<<<<<<<<<<<<<<<<<<<<
; <<<<< Les mutateurs <<<<<
  
Macro SetMatrix44Le11(MatrixA, P_e11)
  
  GetMatrix44Le11(MatrixA) = P_e11
  
EndMacro
  
Macro SetMatrix44Le21(MatrixA, P_e21)
  
  GetMatrix44Le21(MatrixA) = P_e21
  
EndMacro
 
Macro SetMatrix44Le31(MatrixA, P_e31)
  
  GetMatrix44Le31(MatrixA) = P_e31
  
EndMacro
  
Macro SetMatrix44Le41(MatrixA, P_e41)
  
  GetMatrix44Le41(MatrixA) = P_e41
  
EndMacro
  
Macro SetMatrix44Le12(MatrixA, P_e12)
  
  GetMatrix44Le12(MatrixA) = P_e12
  
EndMacro
  
Macro SetMatrix44Le22(MatrixA, P_e22)
  
  GetMatrix44Le22(MatrixA) = P_e22
  
EndMacro
  
Macro SetMatrix44Le32(MatrixA, P_e32)
  
  GetMatrix44Le32(MatrixA) = P_e32
  
EndMacro
  
Macro SetMatrix44Le42(MatrixA, P_e42)
  
  GetMatrix44Le42(MatrixA) = P_e42
  
EndMacro
  
Macro SetMatrix44Le13(MatrixA, P_e13)
  
  GetMatrix44Le13(MatrixA) = P_e13
  
EndMacro
  
Macro SetMatrix44Le23(MatrixA, P_e23)
  
  GetMatrix44Le23(MatrixA) = P_e23
  
EndMacro
  
Macro SetMatrix44Le33(MatrixA, P_e33)
  
  GetMatrix44Le33(MatrixA) = P_e33
  
EndMacro
  
Macro SetMatrix44Le43(MatrixA, P_e43)
  
  GetMatrix44Le43(MatrixA) = P_e43
  
EndMacro
  
Macro SetMatrix44Le14(MatrixA, P_e14)
  
  GetMatrix44Le14(MatrixA) = P_e14
  
EndMacro
  
Macro SetMatrix44Le24(MatrixA, P_e24)
  
  GetMatrix44Le24(MatrixA) = P_e24
  
EndMacro
  
Macro SetMatrix44Le34(MatrixA, P_e34)
  
  GetMatrix44Le34(MatrixA) = P_e34
  
EndMacro
  
Macro SetMatrix44Le44(MatrixA, P_e44)
  
  GetMatrix44Le44(MatrixA) = P_e44
  
EndMacro
  
; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
; <<<<< Les mutateurs ligne par ligne <<<<<
  
Macro SetMatrix44LLine1(MatrixA, P_e11, P_e12, P_e13, P_e14)
  
  SetMatrix44Le11(MatrixA, P_e11)
  SetMatrix44Le12(MatrixA, P_e12)
  SetMatrix44Le13(MatrixA, P_e13)
  SetMatrix44Le14(MatrixA, P_e14)
  
EndMacro
  
Macro SetMatrix44LLine2(MatrixA, P_e21, P_e22, P_e23, P_e24)
  
  SetMatrix44Le21(MatrixA, P_e21)
  SetMatrix44Le22(MatrixA, P_e22)
  SetMatrix44Le23(MatrixA, P_e23)
  SetMatrix44Le24(MatrixA, P_e24)
  
EndMacro
  
Macro SetMatrix44LLine3(MatrixA, P_e31, P_e32, P_e33, P_e34)
  
  SetMatrix44Le31(MatrixA, P_e31)
  SetMatrix44Le32(MatrixA, P_e32)
  SetMatrix44Le33(MatrixA, P_e33)
  SetMatrix44Le34(MatrixA, P_e34)
  
EndMacro
  
Macro SetMatrix44LLine4(MatrixA, P_e41, P_e42, P_e43, P_e44)
  
  SetMatrix44Le41(MatrixA, P_e41)
  SetMatrix44Le42(MatrixA, P_e42)
  SetMatrix44Le43(MatrixA, P_e43)
  SetMatrix44Le44(MatrixA, P_e44)
  
EndMacro
  
; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
; <<<<< L'opérateur Product Matrix Vector : R = A * B <<<<<
  
Macro ProductMatrix44LVector4L(VectorR, MatrixA, VectorB)
  
  SetVector4Li(VectorR, GetMatrix44Le11(MatrixA) * GetVector4Li(VectorB) + GetMatrix44Le12(MatrixA) * GetVector4Lj(VectorB) + GetMatrix44Le13(MatrixA) * GetVector4Lk(VectorB) + GetMatrix44Le14(MatrixA) * GetVector4Ll(VectorB))
  SetVector4Lj(VectorR, GetMatrix44Le21(MatrixA) * GetVector4Li(VectorB) + GetMatrix44Le22(MatrixA) * GetVector4Lj(VectorB) + GetMatrix44Le23(MatrixA) * GetVector4Lk(VectorB) + GetMatrix44Le24(MatrixA) * GetVector4Ll(VectorB))
  SetVector4Lk(VectorR, GetMatrix44Le31(MatrixA) * GetVector4Li(VectorB) + GetMatrix44Le32(MatrixA) * GetVector4Lj(VectorB) + GetMatrix44Le33(MatrixA) * GetVector4Lk(VectorB) + GetMatrix44Le34(MatrixA) * GetVector4Ll(VectorB))
  SetVector4Ll(VectorR, GetMatrix44Le41(MatrixA) * GetVector4Li(VectorB) + GetMatrix44Le42(MatrixA) * GetVector4Lj(VectorB) + GetMatrix44Le43(MatrixA) * GetVector4Lk(VectorB) + GetMatrix44Le44(MatrixA) * GetVector4Ll(VectorB))
  
EndMacro
  
; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<
; <<<<< ReadEncodedString <<<<<
  
Procedure.s ReadEncodedString(FileID.l)
  
  Inverse33.Matrix33L
  VectorCoded3.Vector3L
  VectorDecoded3.Vector3L
  Inverse44.Matrix44L
  VectorCoded4.Vector4L
  VectorDecoded4.Vector4L
  
  MatrixID.b = ReadByte(FileID)
  
  Select MatrixID
      
    Case 0
      SetMatrix44LLine1(Inverse44, 13, 100, -63, -58)
      SetMatrix44LLine2(Inverse44, -62, -480, 303, 279)
      SetMatrix44LLine3(Inverse44, 67, 518, -327, -301)
      SetMatrix44LLine4(Inverse44, -41, -317, 200, 184)
      MatrixSize.b = 4
      
    Case 1
      SetMatrix33LLine1(Inverse33, 5, -16, -8)
      SetMatrix33LLine2(Inverse33, 3, -11, -5)
      SetMatrix33LLine3(Inverse33, -2, 6, 3)
      MatrixSize = 3
      
    Case 2
      SetMatrix44LLine1(Inverse44, -56, -158, 173, -60)
      SetMatrix44LLine2(Inverse44, 3, 8, -9, 3)
      SetMatrix44LLine3(Inverse44, 105, 297, -325, 113)
      SetMatrix44LLine4(Inverse44, -93, -263, 288, -100)
      MatrixSize = 4
      
    Case 3
      SetMatrix33LLine1(Inverse33, -4, 3, -1)
      SetMatrix33LLine2(Inverse33, 3, -1, 3)
      SetMatrix33LLine3(Inverse33, 3, -2, 1)
      MatrixSize = 3
      
    Case 4
      SetMatrix44LLine1(Inverse44, -324, 48, 320, 1203)
      SetMatrix44LLine2(Inverse44, 236, -35, -233, -876)
      SetMatrix44LLine3(Inverse44, -243, 36, 240, 902)
      SetMatrix44LLine4(Inverse44, -411, 61, 406, 1526)
      MatrixSize = 4
      
    Case 5
      SetMatrix33LLine1(Inverse33, 42, -11, -35)
      SetMatrix33LLine2(Inverse33, -54, 14, 45)
      SetMatrix33LLine3(Inverse33, 73, -19, -61)
      MatrixSize = 3
      
    Case 6
      SetMatrix44LLine1(Inverse44, 147, 4, 111, -61)
      SetMatrix44LLine2(Inverse44, 278, 8, 210, -115)
      SetMatrix44LLine3(Inverse44, 106, 3, 80, -44)
      SetMatrix44LLine4(Inverse44, -454, -13, -343, 188)
      MatrixSize = 4
      
    Case 7
      SetMatrix33LLine1(Inverse33, -10, 9, 11)
      SetMatrix33LLine2(Inverse33, 47, -42, -51)
      SetMatrix33LLine3(Inverse33, 58, -52, -63)
      MatrixSize = 3
      
    Case 8
      SetMatrix44LLine1(Inverse44, 39, 225, -418, -41)
      SetMatrix44LLine2(Inverse44, -18, -105, 195, 19)
      SetMatrix44LLine3(Inverse44, -38, -219, 407, 40)
      SetMatrix44LLine4(Inverse44, 21, 121, -225, -22)
      MatrixSize = 4
      
    Case 9
      SetMatrix33LLine1(Inverse33, 9, 57, -65)
      SetMatrix33LLine2(Inverse33, -1, -7, 8)
      SetMatrix33LLine3(Inverse33, -1, -6, 7)
      MatrixSize = 3
      
    Case 10
      SetMatrix44LLine1(Inverse44, 62, 51, 4, -63)
      SetMatrix44LLine2(Inverse44, -266, -219, -17, 270)
      SetMatrix44LLine3(Inverse44, 583, 480, 37, -592)
      SetMatrix44LLine4(Inverse44, -786, -647, -50, 798)
      MatrixSize = 4
      
    Case 11
      SetMatrix33LLine1(Inverse33, 17, 30, 27)
      SetMatrix33LLine2(Inverse33, -11, -19, -17)
      SetMatrix33LLine3(Inverse33, -16, -28, -25)
      MatrixSize = 3
      
    Case 12
      SetMatrix44LLine1(Inverse44, 105, 142, 21, -104)
      SetMatrix44LLine2(Inverse44, 29, 39, 6, -28)
      SetMatrix44LLine3(Inverse44, 45, 61, 9, -45)
      SetMatrix44LLine4(Inverse44, -96, -130, -19, 96)
      MatrixSize = 4
      
    Case 13
      SetMatrix33LLine1(Inverse33, 55, 54, -34)
      SetMatrix33LLine2(Inverse33, 47, 46, -29)
      SetMatrix33LLine3(Inverse33, -50, -49, 31)
      MatrixSize = 3
      
    Case 14
      SetMatrix44LLine1(Inverse44, 543, 324, -347, 862)
      SetMatrix44LLine2(Inverse44, -114, -68, 73, -181)
      SetMatrix44LLine3(Inverse44, 216, 129, -138, 343)
      SetMatrix44LLine4(Inverse44, 119, 71, -76, 189)
      MatrixSize = 4
      
    Case 15
      SetMatrix33LLine1(Inverse33, 63, 70, -62)
      SetMatrix33LLine2(Inverse33, 64, 71, -63)
      SetMatrix33LLine3(Inverse33, 8, 9, -8)
      MatrixSize = 3
      
    Case 16
      SetMatrix44LLine1(Inverse44, -86, -5, -63, 76)
      SetMatrix44LLine2(Inverse44, -66, -3, -49, 59)
      SetMatrix44LLine3(Inverse44, -52, -3, -38, 46)
      SetMatrix44LLine4(Inverse44, 53, 3, 39, -47)
      MatrixSize = 4
      
    Case 17
      SetMatrix33LLine1(Inverse33, -24, 8, 15)
      SetMatrix33LLine2(Inverse33, 21, -7, -13)
      SetMatrix33LLine3(Inverse33, -119, 40, 74)
      MatrixSize = 3
      
    Case 18
      SetMatrix44LLine1(Inverse44, 8, -18, 17, -16)
      SetMatrix44LLine2(Inverse44, -41, 89, -83, 81)
      SetMatrix44LLine3(Inverse44, 14, -31, 29, -28)
      SetMatrix44LLine4(Inverse44, -21, 47, -44, 42)
      MatrixSize = 4
      
    Case 19
      SetMatrix33LLine1(Inverse33, -31, 2, 47)
      SetMatrix33LLine2(Inverse33, 15, -1, -23)
      SetMatrix33LLine3(Inverse33, 17, -1, -26)
      MatrixSize = 3
      
    Case 20
      SetMatrix44LLine1(Inverse44, -31, 76, -22, -65)
      SetMatrix44LLine2(Inverse44, -254, 622, -180, -531)
      SetMatrix44LLine3(Inverse44, -134, 328, -95, -280)
      SetMatrix44LLine4(Inverse44, 131, -321, 93, 274)
      MatrixSize = 4
      
    Case 21
      SetMatrix33LLine1(Inverse33, -4, 21, 20)
      SetMatrix33LLine2(Inverse33, -8, 41, 39)
      SetMatrix33LLine3(Inverse33, -13, 66, 63)
      MatrixSize = 3
      
    Case 22
      SetMatrix44LLine1(Inverse44, -33, -3, 18, 46)
      SetMatrix44LLine2(Inverse44, 159, 14, -87, -221)
      SetMatrix44LLine3(Inverse44, 69, 6, -38, -96)
      SetMatrix44LLine4(Inverse44, -182, -16, 100, 253)
      MatrixSize = 4
      
    Case 23
      SetMatrix33LLine1(Inverse33, 17, 10, 5)
      SetMatrix33LLine2(Inverse33, 79, 47, 23)
      SetMatrix33LLine3(Inverse33, 69, 41, 20)
      MatrixSize = 3
      
    Case 24
      SetMatrix44LLine1(Inverse44, -628, 307, 253, -126)
      SetMatrix44LLine2(Inverse44, 35, -17, -14, 7)
      SetMatrix44LLine3(Inverse44, -45, 22, 18, -9)
      SetMatrix44LLine4(Inverse44, -489, 239, 197, -98)
      MatrixSize = 4
      
    Case 25
      SetMatrix33LLine1(Inverse33, 40, 8, 31)
      SetMatrix33LLine2(Inverse33, -49, -10, -38)
      SetMatrix33LLine3(Inverse33, 35, 7, 27)
      MatrixSize = 3
      
    Case 26
      SetMatrix44LLine1(Inverse44, -58, 42, 59, -9)
      SetMatrix44LLine2(Inverse44, 344, -249, -350, 54)
      SetMatrix44LLine3(Inverse44, 517, -374, -526, 81)
      SetMatrix44LLine4(Inverse44, -510, 369, 519, -80)
      MatrixSize = 4
      
    Case 27
      SetMatrix33LLine1(Inverse33, 9, 32, 24)
      SetMatrix33LLine2(Inverse33, -1, -4, -3)
      SetMatrix33LLine3(Inverse33, -1, -3, -2)
      MatrixSize = 3
      
    Case 28
      SetMatrix44LLine1(Inverse44, -189, 635, 77, -307)
      SetMatrix44LLine2(Inverse44, -37, 124, 15, -60)
      SetMatrix44LLine3(Inverse44, -120, 403, 49, -195)
      SetMatrix44LLine4(Inverse44, -27, 91, 11, -44)
      MatrixSize = 4
      
    Case 29
      SetMatrix33LLine1(Inverse33, 2, 2, -1)
      SetMatrix33LLine2(Inverse33, -22, -23, 12)
      SetMatrix33LLine3(Inverse33, -49, -51, 27)
      MatrixSize = 3
      
    Case 30
      SetMatrix44LLine1(Inverse44, 18, 222, -69, 236)
      SetMatrix44LLine2(Inverse44, 26, 319, -99, 339)
      SetMatrix44LLine3(Inverse44, -48, -589, 183, -626)
      SetMatrix44LLine4(Inverse44, -35, -431, 134, -458)
      MatrixSize = 4
      
    Case 31
      SetMatrix33LLine1(Inverse33, 27, 23, -45)
      SetMatrix33LLine2(Inverse33, -26, -22, 43)
      SetMatrix33LLine3(Inverse33, -32, -27, 53)
      MatrixSize = 3
      
    Case 32
      SetMatrix44LLine1(Inverse44, 208, -237, 212, -213)
      SetMatrix44LLine2(Inverse44, 199, -227, 203, -204)
      SetMatrix44LLine3(Inverse44, 200, -228, 204, -205)
      SetMatrix44LLine4(Inverse44, -157, 179, -160, 161)
      MatrixSize = 4
      
    Case 33
      SetMatrix33LLine1(Inverse33, 0, 1, 0)
      SetMatrix33LLine2(Inverse33, 4, 21, -1)
      SetMatrix33LLine3(Inverse33, -5, -28, 1)
      MatrixSize = 3
      
    Case 34
      SetMatrix44LLine1(Inverse44, -292, -185, -273, -172)
      SetMatrix44LLine2(Inverse44, -46, -29, -43, -27)
      SetMatrix44LLine3(Inverse44, -185, -117, -173, -109)
      SetMatrix44LLine4(Inverse44, -90, -57, -84, -53)
      MatrixSize = 4
      
    Case 35
      SetMatrix33LLine1(Inverse33, -5, -25, 17)
      SetMatrix33LLine2(Inverse33, 6, 31, -21)
      SetMatrix33LLine3(Inverse33, -7, -35, 24)
      MatrixSize = 3
      
    Case 36
      SetMatrix44LLine1(Inverse44, 153, 136, 8, 22)
      SetMatrix44LLine2(Inverse44, 152, 135, 8, 22)
      SetMatrix44LLine3(Inverse44, -189, -168, -10, -27)
      SetMatrix44LLine4(Inverse44, 92, 82, 5, 13)
      MatrixSize = 4
      
    Case 37
      SetMatrix33LLine1(Inverse33, 1, -2, -5)
      SetMatrix33LLine2(Inverse33, 7, -12, -32)
      SetMatrix33LLine3(Inverse33, -12, 21, 56)
      MatrixSize = 3
      
    Case 38
      SetMatrix44LLine1(Inverse44, 3, -5, -22, 16)
      SetMatrix44LLine2(Inverse44, 2, -1, -11, 5)
      SetMatrix44LLine3(Inverse44, 1, -3, -10, 9)
      SetMatrix44LLine4(Inverse44, 0, -2, -3, 5)
      MatrixSize = 4
      
    Case 39
      SetMatrix33LLine1(Inverse33, -19, 28, -35)
      SetMatrix33LLine2(Inverse33, 8, -12, 15)
      SetMatrix33LLine3(Inverse33, 24, -35, 44)
      MatrixSize = 3
      
    Case 40
      SetMatrix44LLine1(Inverse44, -153, 40, 461, -335)
      SetMatrix44LLine2(Inverse44, 57, -15, -172, 125)
      SetMatrix44LLine3(Inverse44, 226, -59, -681, 495)
      SetMatrix44LLine4(Inverse44, -84, 22, 253, -184)
      MatrixSize = 4
      
    Case 41
      SetMatrix33LLine1(Inverse33, 56, 75, -26)
      SetMatrix33LLine2(Inverse33, -32, -43, 15)
      SetMatrix33LLine3(Inverse33, 15, 20, -7)
      MatrixSize = 3
      
    Case 42
      SetMatrix44LLine1(Inverse44, -122, -217, 56, 41)
      SetMatrix44LLine2(Inverse44, -253, -449, 116, 85)
      SetMatrix44LLine3(Inverse44, 107, 190, -49, -36)
      SetMatrix44LLine4(Inverse44, -277, -492, 127, 93)
      MatrixSize = 4
      
    Case 43
      SetMatrix33LLine1(Inverse33, 17, -37, -8)
      SetMatrix33LLine2(Inverse33, 4, -9, -2)
      SetMatrix33LLine3(Inverse33, 15, -33, -7)
      MatrixSize = 3
      
    Case 44
      SetMatrix44LLine1(Inverse44, -12, 40, 31, -24)
      SetMatrix44LLine2(Inverse44, 132, -440, -340, 263)
      SetMatrix44LLine3(Inverse44, 89, -296, -229, 177)
      SetMatrix44LLine4(Inverse44, 106, -353, -273, 211)
      MatrixSize = 4
      
    Case 45
      SetMatrix33LLine1(Inverse33, -120, -11, 34)
      SetMatrix33LLine2(Inverse33, -88, -8, 25)
      SetMatrix33LLine3(Inverse33, 21, 2, -6)
      MatrixSize = 3
      
    Case 46
      SetMatrix44LLine1(Inverse44, 66, 43, -183, -231)
      SetMatrix44LLine2(Inverse44, 160, 104, -443, -559)
      SetMatrix44LLine3(Inverse44, 51, 33, -141, -178)
      SetMatrix44LLine4(Inverse44, -40, -26, 111, 140)
      MatrixSize = 4
      
    Case 47
      SetMatrix33LLine1(Inverse33, -24, -55, 27)
      SetMatrix33LLine2(Inverse33, 17, 39, -19)
      SetMatrix33LLine3(Inverse33, -6, -14, 7)
      MatrixSize = 3
      
    Case 48
      SetMatrix44LLine1(Inverse44, -497, 573, 747, 588)
      SetMatrix44LLine2(Inverse44, 300, -346, -451, -355)
      SetMatrix44LLine3(Inverse44, -437, 504, 657, 517)
      SetMatrix44LLine4(Inverse44, 6, -7, -9, -7)
      MatrixSize = 4
      
    Case 49
      SetMatrix33LLine1(Inverse33, -4, 14, -21)
      SetMatrix33LLine2(Inverse33, 6, -21, 32)
      SetMatrix33LLine3(Inverse33, 3, -10, 15)
      MatrixSize = 3
      
    Case 50
      SetMatrix44LLine1(Inverse44, 5, -8, 48, -7)
      SetMatrix44LLine2(Inverse44, -17, 27, -162, 23)
      SetMatrix44LLine3(Inverse44, 0, 0, -1, 0)
      SetMatrix44LLine4(Inverse44, 26, -41, 246, -35)
      MatrixSize = 4
      
    Case 51
      SetMatrix33LLine1(Inverse33, 44, -20, 51)
      SetMatrix33LLine2(Inverse33, -37, 17, -43)
      SetMatrix33LLine3(Inverse33, -20, 9, -23)
      MatrixSize = 3
      
    Case 52
      SetMatrix44LLine1(Inverse44, 592, -19, 1039, -71)
      SetMatrix44LLine2(Inverse44, -159, 5, -279, 19)
      SetMatrix44LLine3(Inverse44, 375, -12, 658, -45)
      SetMatrix44LLine4(Inverse44, 33, -1, 58, -4)
      MatrixSize = 4
      
    Case 53
      SetMatrix33LLine1(Inverse33, -19, 3, -10)
      SetMatrix33LLine2(Inverse33, 13, -2, 7)
      SetMatrix33LLine3(Inverse33, 9, -1, 5)
      MatrixSize = 3
      
    Case 54
      SetMatrix44LLine1(Inverse44, -234, 360, 14, -81)
      SetMatrix44LLine2(Inverse44, 32, -49, -2, 11)
      SetMatrix44LLine3(Inverse44, 84, -129, -5, 29)
      SetMatrix44LLine4(Inverse44, 353, -543, -21, 122)
      MatrixSize = 4
      
    Case 55
      SetMatrix33LLine1(Inverse33, -3, 16, 6)
      SetMatrix33LLine2(Inverse33, 3, -14, -5)
      SetMatrix33LLine3(Inverse33, -1, 3, 1)
      MatrixSize = 3
      
    Case 56
      SetMatrix44LLine1(Inverse44, -360, 417, 269, -366)
      SetMatrix44LLine2(Inverse44, 241, -279, -180, 245)
      SetMatrix44LLine3(Inverse44, 297, -344, -222, 302)
      SetMatrix44LLine4(Inverse44, 71, -82, -53, 72)
      MatrixSize = 4
      
    Case 57
      SetMatrix33LLine1(Inverse33, -1, 3, -6)
      SetMatrix33LLine2(Inverse33, 11, -35, 67)
      SetMatrix33LLine3(Inverse33, -7, 22, -42)
      MatrixSize = 3
      
    Case 58
      SetMatrix44LLine1(Inverse44, 7, 128, 79, -11)
      SetMatrix44LLine2(Inverse44, -13, -243, -150, 21)
      SetMatrix44LLine3(Inverse44, -5, -92, -57, 8)
      SetMatrix44LLine4(Inverse44, -4, -71, -44, 6)
      MatrixSize = 4
      
    Case 59
      SetMatrix33LLine1(Inverse33, -9, -25, 21)
      SetMatrix33LLine2(Inverse33, 4, 11, -9)
      SetMatrix33LLine3(Inverse33, -7, -20, 17)
      MatrixSize = 3
      
    Case 60
      SetMatrix44LLine1(Inverse44, 2, -23, -14, 5)
      SetMatrix44LLine2(Inverse44, 0, 6, 4, -1)
      SetMatrix44LLine3(Inverse44, -13, 125, 74, -29)
      SetMatrix44LLine4(Inverse44, -6, 56, 33, -13)
      MatrixSize = 4
      
    Case 61
      SetMatrix33LLine1(Inverse33, -31, -14, -32)
      SetMatrix33LLine2(Inverse33, -22, -10, -23)
      SetMatrix33LLine3(Inverse33, 7, 3, 7)
      MatrixSize = 3
      
    Case 62
      SetMatrix44LLine1(Inverse44, 331, -84, -104, 335)
      SetMatrix44LLine2(Inverse44, -360, 91, 113, -364)
      SetMatrix44LLine3(Inverse44, 261, -66, -82, 264)
      SetMatrix44LLine4(Inverse44, 83, -21, -26, 84)
      MatrixSize = 4
      
  EndSelect
  
  MaxChar.l = ReadLong(FileID)
  
  Select MatrixSize
      
    Case 3
      For Index = 0 To MaxChar - 1 Step 3
        
        ReadVector3L(FileID, VectorCoded3)
        ProductMatrix33LVector3L(VectorDecoded3, Inverse33, VectorCoded3)
        String.s = String + Chr(GetVector3Li(VectorDecoded3)) + Chr(GetVector3Lj(VectorDecoded3)) + Chr(GetVector3Lk(VectorDecoded3))
        
      Next
      
    Case 4
      For Index = 0 To MaxChar - 1 Step 4
        
        ReadVector4L(FileID, VectorCoded4)
        ProductMatrix44LVector4L(VectorDecoded4, Inverse44, VectorCoded4)
        String.s = String + Chr(GetVector4Li(VectorDecoded4)) + Chr(GetVector4Lj(VectorDecoded4)) + Chr(GetVector4Lk(VectorDecoded4)) + Chr(GetVector4Ll(VectorDecoded4))
        
      Next
      
  EndSelect
  
  ProcedureReturn String
EndProcedure
    
; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
; <<<<< WriteEncodedString <<<<<
    
Procedure WriteEncodedString(FileID.l, String.s)
  
  Matrix33.Matrix33L
  VectorCoded3.Vector3L
  VectorDecoded3.Vector3L
  Matrix44.Matrix44L
  VectorCoded4.Vector4L
  VectorDecoded4.Vector4L
  
  MatrixID = Random(62)
  
  Select MatrixID
      
    Case 0
      SetMatrix44LLine1(Matrix44, 6, 7, 9, 6)
      SetMatrix44LLine2(Matrix44, 2, -3, -5, -3)
      SetMatrix44LLine3(Matrix44, 9, -7, -7, 2)
      SetMatrix44LLine4(Matrix44, -5, 4, 1, -6)
      MatrixSize.b = 4
      
    Case 1
      SetMatrix33LLine1(Matrix33, -3, 0, -8)
      SetMatrix33LLine2(Matrix33, 1, -1, 1)
      SetMatrix33LLine3(Matrix33, -4, 2, -7)
      MatrixSize = 3
      
    Case 2
      SetMatrix44LLine1(Matrix44, -2, 5, 5, 7)
      SetMatrix44LLine2(Matrix44, -6, -7, -3, 0)
      SetMatrix44LLine3(Matrix44, -3, -2, 2, 4)
      SetMatrix44LLine4(Matrix44, 9, 8, 9, 5)
      MatrixSize = 4
      
    Case 3
      SetMatrix33LLine1(Matrix33, 5, -1, 8)
      SetMatrix33LLine2(Matrix33, 6, -1, 9)
      SetMatrix33LLine3(Matrix33, -3, 1, -5)
      MatrixSize = 3
      
    Case 4
      SetMatrix44LLine1(Matrix44, 6, 8, -7, 4)
      SetMatrix44LLine2(Matrix44, -8, -6, -7, 7)
      SetMatrix44LLine3(Matrix44, -4, 9, 9, 3)
      SetMatrix44LLine4(Matrix44, 3, 0, -4, 0)
      MatrixSize = 4
      
    Case 5
      SetMatrix33LLine1(Matrix33, 1, -6, -5)
      SetMatrix33LLine2(Matrix33, -9, -7, 0)
      SetMatrix33LLine3(Matrix33, 4, -5, -6)
      MatrixSize = 3
      
    Case 6
      SetMatrix44LLine1(Matrix44, 1, 9, 5, 7)
      SetMatrix44LLine2(Matrix44, -6, -2, 5, -2)
      SetMatrix44LLine3(Matrix44, 0, -8, -9, -7)
      SetMatrix44LLine4(Matrix44, 2, 7, -4, 4)
      MatrixSize = 4
      
    Case 7
      SetMatrix33LLine1(Matrix33, 6, 5, -3)
      SetMatrix33LLine2(Matrix33, -3, 8, -7)
      SetMatrix33LLine3(Matrix33, 8, -2, 3)
      MatrixSize = 3
      
    Case 8
      SetMatrix44LLine1(Matrix44, 8, 6, 7, 3)
      SetMatrix44LLine2(Matrix44, 9, 1, 6, -5)
      SetMatrix44LLine3(Matrix44, 5, 1, 3, -3)
      SetMatrix44LLine4(Matrix44, 6, 1, 9, 6)
      MatrixSize = 4
      
    Case 9
      SetMatrix33LLine1(Matrix33, 1, 9, -1)
      SetMatrix33LLine2(Matrix33, 1, 2, 7)
      SetMatrix33LLine3(Matrix33, 1, 3, 6)
      MatrixSize = 3
      
    Case 10
      SetMatrix44LLine1(Matrix44, -8, 5, -9, -9)
      SetMatrix44LLine2(Matrix44, -2, -8, 6, 7)
      SetMatrix44LLine3(Matrix44, 8, -7, 0, 3)
      SetMatrix44LLine4(Matrix44, -9, -2, -4, -3)
      MatrixSize = 4
      
    Case 11
      SetMatrix33LLine1(Matrix33, -1, -6, 3)
      SetMatrix33LLine2(Matrix33, -3, 7, -8)
      SetMatrix33LLine3(Matrix33, 4, -4, 7)
      MatrixSize = 3
      
    Case 12
      SetMatrix44LLine1(Matrix44, -7, 8, -8, -9)
      SetMatrix44LLine2(Matrix44, 9, -9, 4, 9)
      SetMatrix44LLine3(Matrix44, -6, 6, 8, -1)
      SetMatrix44LLine4(Matrix44, 4, -3, -1, 3)
      MatrixSize = 4
      
    Case 13
      SetMatrix33LLine1(Matrix33, -5, 8, 2)
      SetMatrix33LLine2(Matrix33, 7, -5, 3)
      SetMatrix33LLine3(Matrix33, 3, 5, 8)
      MatrixSize = 3
      
    Case 14
      SetMatrix44LLine1(Matrix44, 6, 8, -7, -7)
      SetMatrix44LLine2(Matrix44, -1, 1, 8, -9)
      SetMatrix44LLine3(Matrix44, 1, 6, -1, 3)
      SetMatrix44LLine4(Matrix44, -3, -3, 1, 9)
      MatrixSize = 4
      
    Case 15
      SetMatrix33LLine1(Matrix33, -1, 2, -8)
      SetMatrix33LLine2(Matrix33, 8, -8, 1)
      SetMatrix33LLine3(Matrix33, 8, -7, -7)
      MatrixSize = 3
      
    Case 16
      SetMatrix44LLine1(Matrix44, -6, -1, 2, -9)
      SetMatrix44LLine2(Matrix44, 4, 2, -1, 8)
      SetMatrix44LLine3(Matrix44, -3, 0, 7, 2)
      SetMatrix44LLine4(Matrix44, -9, -1, 8, -8)
      MatrixSize = 4
      
    Case 17
      SetMatrix33LLine1(Matrix33, 2, 8, 1)
      SetMatrix33LLine2(Matrix33, -7, 9, 3)
      SetMatrix33LLine3(Matrix33, 7, 8, 0)
      MatrixSize = 3
      
    Case 18
      SetMatrix44LLine1(Matrix44, 3, -2, -9, -1)
      SetMatrix44LLine2(Matrix44, 7, 0, 5, 6)
      SetMatrix44LLine3(Matrix44, 7, 0, 2, 4)
      SetMatrix44LLine4(Matrix44, 1, -1, -8, -3)
      MatrixSize = 4
      
    Case 19
      SetMatrix33LLine1(Matrix33, -3, -5, -1)
      SetMatrix33LLine2(Matrix33, 1, -7, 8)
      SetMatrix33LLine3(Matrix33, -2, -3, -1)
      MatrixSize = 3
      
    Case 20
      SetMatrix44LLine1(Matrix44, 1, 1, -8, -6)
      SetMatrix44LLine2(Matrix44, -7, 3, -7, -3)
      SetMatrix44LLine3(Matrix44, -2, 6, -7, 4)
      SetMatrix44LLine4(Matrix44, -8, 1, -2, -2)
      MatrixSize = 4
      
    Case 21
      SetMatrix33LLine1(Matrix33, 9, -3, -1)
      SetMatrix33LLine2(Matrix33, -3, 8, -4)
      SetMatrix33LLine3(Matrix33, 5, -9, 4)
      MatrixSize = 3
      
    Case 22
      SetMatrix44LLine1(Matrix44, 6, 2, -7, -2)
      SetMatrix44LLine2(Matrix44, -5, -4, -9, -6)
      SetMatrix44LLine3(Matrix44, 0, 3, 1, 3)
      SetMatrix44LLine4(Matrix44, 4, 0, -6, -3)
      MatrixSize = 4
      
    Case 23
      SetMatrix33LLine1(Matrix33, 3, -5, 5)
      SetMatrix33LLine2(Matrix33, -7, 5, -4)
      SetMatrix33LLine3(Matrix33, 4, 7, -9)
      MatrixSize = 3
      
    Case 24
      SetMatrix44LLine1(Matrix44, 1, 4, 0, -1)
      SetMatrix44LLine2(Matrix44, 0, 9, 7, 0)
      SetMatrix44LLine3(Matrix44, -1, 1, -7, 2)
      SetMatrix44LLine4(Matrix44, -7, 4, 3, 9)
      MatrixSize = 4
      
    Case 25
      SetMatrix33LLine1(Matrix33, -4, 1, 6)
      SetMatrix33LLine2(Matrix33, -7, -5, 1)
      SetMatrix33LLine3(Matrix33, 7, 0, -8)
      MatrixSize = 3
      
    Case 26
      SetMatrix44LLine1(Matrix44, 7, 1, 9, 9)
      SetMatrix44LLine2(Matrix44, 6, -5, 4, 0)
      SetMatrix44LLine3(Matrix44, 4, 5, 6, 9)
      SetMatrix44LLine4(Matrix44, 9, 3, 0, 1)
      MatrixSize = 4
      
    Case 27
      SetMatrix33LLine1(Matrix33, 1, 8, 0)
      SetMatrix33LLine2(Matrix33, -1, -6, -3)
      SetMatrix33LLine3(Matrix33, 1, 5, 4)
      MatrixSize = 3
      
    Case 28
      SetMatrix44LLine1(Matrix44, -1, -4, 1, 8)
      SetMatrix44LLine2(Matrix44, 2, -3, -2, -1)
      SetMatrix44LLine3(Matrix44, 1, -9, 3, -8)
      SetMatrix44LLine4(Matrix44, 5, -6, -4, -9)
      MatrixSize = 4
      
    Case 29
      SetMatrix33LLine1(Matrix33, 9, 3, -1)
      SetMatrix33LLine2(Matrix33, -6, -5, 2)
      SetMatrix33LLine3(Matrix33, 5, -4, 2)
      MatrixSize = 3
      
    Case 30
      SetMatrix44LLine1(Matrix44, -7, -4, -7, 3)
      SetMatrix44LLine2(Matrix44, -7, 6, 5, -6)
      SetMatrix44LLine3(Matrix44, 3, 8, 4, 2)
      SetMatrix44LLine4(Matrix44, 8, -3, -3, 6)
      MatrixSize = 4
      
    Case 31
      SetMatrix33LLine1(Matrix33, -5, -4, -1)
      SetMatrix33LLine2(Matrix33, 2, -9, 9)
      SetMatrix33LLine3(Matrix33, -2, -7, 4)
      MatrixSize = 3
      
    Case 32
      SetMatrix44LLine1(Matrix44, 5, -4, -2, -1)
      SetMatrix44LLine2(Matrix44, -1, -8, 9, 0)
      SetMatrix44LLine3(Matrix44, -2, -1, 7, 5)
      SetMatrix44LLine4(Matrix44, 4, 4, -5, 4)
      MatrixSize = 4
      
    Case 33
      SetMatrix33LLine1(Matrix33, -7, -1, -1)
      SetMatrix33LLine2(Matrix33, 1, 0, 0)
      SetMatrix33LLine3(Matrix33, -7, -5, -4)
      MatrixSize = 3
      
    Case 34
      SetMatrix44LLine1(Matrix44, 2, -5, 1, -6)
      SetMatrix44LLine2(Matrix44, -3, 1, 4, 1)
      SetMatrix44LLine3(Matrix44, -2, -1, 0, 7)
      SetMatrix44LLine4(Matrix44, 3, 9, -6, -2)
      MatrixSize = 4
      
    Case 35
      SetMatrix33LLine1(Matrix33, -9, -5, 2)
      SetMatrix33LLine2(Matrix33, -3, 1, 3)
      SetMatrix33LLine3(Matrix33, -7, 0, 5)
      MatrixSize = 3
      
    Case 36
      SetMatrix44LLine1(Matrix44, -5, 0, -6, -4)
      SetMatrix44LLine2(Matrix44, 6, -1, 6, 4)
      SetMatrix44LLine3(Matrix44, -9, 6, -1, 3)
      SetMatrix44LLine4(Matrix44, 1, 4, 5, 2)
      MatrixSize = 4
      
    Case 37
      SetMatrix33LLine1(Matrix33, 0, 7, 4)
      SetMatrix33LLine2(Matrix33, -8, -4, -3)
      SetMatrix33LLine3(Matrix33, 3, 3, 2)
      MatrixSize = 3
      
    Case 38
      SetMatrix44LLine1(Matrix44, -1, 5, -6, 9)
      SetMatrix44LLine2(Matrix44, -6, 7, 4, 5)
      SetMatrix44LLine3(Matrix44, -1, 2, -1, 3)
      SetMatrix44LLine4(Matrix44, -3, 4, 1, 4)
      MatrixSize = 4
      
    Case 39
      SetMatrix33LLine1(Matrix33, -3, -7, 0)
      SetMatrix33LLine2(Matrix33, 8, 4, 5)
      SetMatrix33LLine3(Matrix33, 8, 7, 4)
      MatrixSize = 3
      
    Case 40
      SetMatrix44LLine1(Matrix44, -8, -9, -5, -5)
      SetMatrix44LLine2(Matrix44, 5, -3, 6, 5)
      SetMatrix44LLine3(Matrix44, 2, -2, 0, -5)
      SetMatrix44LLine4(Matrix44, 7, 1, 3, -4)
      MatrixSize = 4
      
    Case 41
      SetMatrix33LLine1(Matrix33, 1, 5, 7)
      SetMatrix33LLine2(Matrix33, 1, -2, -8)
      SetMatrix33LLine3(Matrix33, 5, 5, -8)
      MatrixSize = 3
      
    Case 42
      SetMatrix44LLine1(Matrix44, 7, 1, 0, -4)
      SetMatrix44LLine2(Matrix44, -1, 2, 1, -1)
      SetMatrix44LLine3(Matrix44, 7, 7, 9, -6)
      SetMatrix44LLine4(Matrix44, 6, 4, -7, -9)
      MatrixSize = 4
      
    Case 43
      SetMatrix33LLine1(Matrix33, 3, -5, -2)
      SetMatrix33LLine2(Matrix33, 2, -1, -2)
      SetMatrix33LLine3(Matrix33, -3, -6, 5)
      MatrixSize = 3
      
    Case 44
      SetMatrix44LLine1(Matrix44, 7, 1, 9, -8)
      SetMatrix44LLine2(Matrix44, -5, -1, 2, -1)
      SetMatrix44LLine3(Matrix44, 3, 4, 4, -8)
      SetMatrix44LLine4(Matrix44, -8, 3, 4, -8)
      MatrixSize = 4
      
    Case 45
      SetMatrix33LLine1(Matrix33, -2, 2, -3)
      SetMatrix33LLine2(Matrix33, -3, 6, 8)
      SetMatrix33LLine3(Matrix33, -8, 9, -8)
      MatrixSize = 3
      
    Case 46
      SetMatrix44LLine1(Matrix44, -5, 3, 1, 5)
      SetMatrix44LLine2(Matrix44, 1, 3, -6, 6)
      SetMatrix44LLine3(Matrix44, 6, -2, 4, 7)
      SetMatrix44LLine4(Matrix44, -6, 3, -4, -3)
      MatrixSize = 4
      
    Case 47
      SetMatrix33LLine1(Matrix33, -7, -7, 8)
      SetMatrix33LLine2(Matrix33, 5, 6, -3)
      SetMatrix33LLine3(Matrix33, 4, 6, 1)
      MatrixSize = 3
      
    Case 48
      SetMatrix44LLine1(Matrix44, -8, -9, 3, 6)
      SetMatrix44LLine2(Matrix44, -2, -9, -4, -7)
      SetMatrix44LLine3(Matrix44, -3, 8, 9, 7)
      SetMatrix44LLine4(Matrix44, -1, -9, -5, 3)
      MatrixSize = 4
      
    Case 49
      SetMatrix33LLine1(Matrix33, 5, 0, 7)
      SetMatrix33LLine2(Matrix33, 6, 3, 2)
      SetMatrix33LLine3(Matrix33, 3, 2, 0)
      MatrixSize = 3
      
    Case 50
      SetMatrix44LLine1(Matrix44, -2, 7, 0, 5)
      SetMatrix44LLine2(Matrix44, 3, 7, -6, 4)
      SetMatrix44LLine3(Matrix44, 0, 0, -1, 0)
      SetMatrix44LLine4(Matrix44, -5, -3, 0, -1)
      MatrixSize = 4
      
    Case 51
      SetMatrix33LLine1(Matrix33, -4, -1, -7)
      SetMatrix33LLine2(Matrix33, 9, 8, 5)
      SetMatrix33LLine3(Matrix33, 7, 4, 8)
      MatrixSize = 3
      
    Case 52
      SetMatrix44LLine1(Matrix44, -5, -1, 8, -6)
      SetMatrix44LLine2(Matrix44, -3, -5, 2, 7)
      SetMatrix44LLine3(Matrix44, 3, 0, -5, 3)
      SetMatrix44LLine4(Matrix44, 3, -7, -7, -8)
      MatrixSize = 4
      
    Case 53
      SetMatrix33LLine1(Matrix33, -3, -5, 1)
      SetMatrix33LLine2(Matrix33, -2, -5, 3)
      SetMatrix33LLine3(Matrix33, 5, 8, -1)
      MatrixSize = 3
      
    Case 54
      SetMatrix44LLine1(Matrix44, 1, 0, 7, -1)
      SetMatrix44LLine2(Matrix44, -1, -1, 6, -2)
      SetMatrix44LLine3(Matrix44, 2, -9, 9, 0)
      SetMatrix44LLine4(Matrix44, -7, -6, 8, -6)
      MatrixSize = 4
      
    Case 55
      SetMatrix33LLine1(Matrix33, -1, -2, -4)
      SetMatrix33LLine2(Matrix33, -2, -3, -3)
      SetMatrix33LLine3(Matrix33, 5, 7, 6)
      MatrixSize = 3
      
    Case 56
      SetMatrix44LLine1(Matrix44, -2, 2, -5, 4)
      SetMatrix44LLine2(Matrix44, 7, 4, 5, 1)
      SetMatrix44LLine3(Matrix44, -4, 6, -9, -3)
      SetMatrix44LLine4(Matrix44, 7, 7, 4, -5)
      MatrixSize = 4
      
    Case 57
      SetMatrix33LLine1(Matrix33, -4, -6, -9)
      SetMatrix33LLine2(Matrix33, -7, 0, 1)
      SetMatrix33LLine3(Matrix33, -3, 1, 2)
      MatrixSize = 3
      
    Case 58
      SetMatrix44LLine1(Matrix44, 9, 5, -3, 3)
      SetMatrix44LLine2(Matrix44, 2, 0, 2, 1)
      SetMatrix44LLine3(Matrix44, -5, -1, -2, -3)
      SetMatrix44LLine4(Matrix44, -7, -4, 7, -8)
      MatrixSize = 4
      
    Case 59
      SetMatrix33LLine1(Matrix33, -7, -5, 6)
      SetMatrix33LLine2(Matrix33, 5, 6, -3)
      SetMatrix33LLine3(Matrix33, 3, 5, -1)
      MatrixSize = 3
      
    Case 60
      SetMatrix44LLine1(Matrix44, 7, 6, 1, 0)
      SetMatrix44LLine2(Matrix44, 5, 5, -2, 6)
      SetMatrix44LLine3(Matrix44, -8, -7, 2, -7)
      SetMatrix44LLine4(Matrix44, -2, 1, -4, 8)
      MatrixSize = 4
      
    Case 61
      SetMatrix33LLine1(Matrix33, -1, 2, 2)
      SetMatrix33LLine2(Matrix33, -7, 7, -9)
      SetMatrix33LLine3(Matrix33, 4, -5, 2)
      MatrixSize = 3
      
    Case 62
      SetMatrix44LLine1(Matrix44, 0, -6, -7, -4)
      SetMatrix44LLine2(Matrix44, -4, 4, 9, 5)
      SetMatrix44LLine3(Matrix44, 0, -3, -7, 9)
      SetMatrix44LLine4(Matrix44, -1, 6, 7, 8)
      MatrixSize = 4
      
  EndSelect
  
  WriteByte(FileID, MatrixID)
  MaxChar.l = Len(String)
  WriteLong(FileID, MaxChar)
  
  Select MatrixSize
      
    Case 3
      For Index = 0 To MaxChar - 1 Step 3
        
        SetVector3Li(VectorDecoded3, Asc(Mid(String, Index + 1, 1)))
        SetVector3Lj(VectorDecoded3, Asc(Mid(String, Index + 2, 1)))
        SetVector3Lk(VectorDecoded3, Asc(Mid(String, Index + 3, 1)))
        ProductMatrix33LVector3L(VectorCoded3, Matrix33, VectorDecoded3)
        WriteVector3L(FileID, VectorCoded3)
        
      Next
      
    Case 4
      For Index = 0 To MaxChar - 1 Step 4
        
        SetVector4Li(VectorDecoded4, Asc(Mid(String, Index + 1, 1)))
        SetVector4Lj(VectorDecoded4, Asc(Mid(String, Index + 2, 1)))
        SetVector4Lk(VectorDecoded4, Asc(Mid(String, Index + 3, 1)))
        SetVector4Ll(VectorDecoded4, Asc(Mid(String, Index + 4, 1)))
        ProductMatrix44LVector4L(VectorCoded4, Matrix44, VectorDecoded4)
        WriteVector4L(FileID, VectorCoded4)
        
      Next
      
  EndSelect
  
EndProcedure
A+
Guimauve
Dernière modification par Guimauve le dim. 20/juin/2010 19:46, modifié 1 fois.
Avatar de l’utilisateur
SPH
Messages : 4947
Inscription : mer. 09/nov./2005 9:53

Re: Read/ Write Power Encoded String

Message par SPH »

Ce que je cherche à faire est simple, c'est de rendre illisible les textes écris dans le fichier.
Ouai.... Donc, j'avais bien compris que c'était de la CRYPTOGRAPHIE :!: :!: :!: :wink:

PS : je peux faire 10 fois moins long et 10 fois plus sécurisé

!i!i!i!i!i!i!i!i!i!
!i!i!i!i!i!i!
!i!i!i!
//// Informations ////
Intel Core i7 4770 64 bits - GTX 650 Ti
Version de PB : 6.12LTS- 64 bits
Guimauve
Messages : 1015
Inscription : mer. 11/févr./2004 0:32
Localisation : Québec, Canada

Re: Read/ Write Power Encoded String

Message par Guimauve »

SPH a écrit :
Ce que je cherche à faire est simple, c'est de rendre illisible les textes écris dans le fichier.
Ouai.... Donc, j'avais bien compris que c'était de la CRYPTOGRAPHIE :!: :!: :!: :wink:

PS : je peux faire 10 fois moins long et 10 fois plus sécurisé
À ce que je vois tu n'as rien compris...

JE NE CHERCHE PAS À AVOIR LA MOINDRE SÉCURITÉ AVEC CES CODES !!!!

Si tu pouvais simplement comprendre ça, cela serait très apprécié.

A+
Guimauve
Avatar de l’utilisateur
flaith
Messages : 1487
Inscription : jeu. 07/avr./2005 1:06
Localisation : Rennes
Contact :

Re: Read/ Write Power Encoded String

Message par flaith »

Guimauve a écrit :...À 8192 bits avec une clé de 1024 caractères, cela va prendre tellement de temps que le soleil va avoir le temps de s'éteindre avant que quiconque passe à travers..
Avec les ordinateurs quantiques qui arriveront dans quelques années, cela ne sera plus vrai :wink:
Guimauve
Messages : 1015
Inscription : mer. 11/févr./2004 0:32
Localisation : Québec, Canada

Re: Read/ Write Power Encoded String

Message par Guimauve »

flaith a écrit :Avec les ordinateurs quantiques qui arriveront dans quelques années, cela ne sera plus vrai :wink:
Peut-être mais tu oublie une chose importante, c'est que les systèmes de cryptage vont également devenir plus complexe. Alors on en sera toujours au même point. Le système inviolable n'existe pas et n'existera probablement jamais. Au mieux il sera difficilement cassable à court et moyen terme mais certainement pas à long terme.

A+
Guimauve
lepiaf31
Messages : 510
Inscription : dim. 25/mars/2007 13:44
Localisation : Toulouse, France
Contact :

Re: Read/ Write Power Encoded String

Message par lepiaf31 »

flaith a écrit :
Guimauve a écrit :...À 8192 bits avec une clé de 1024 caractères, cela va prendre tellement de temps que le soleil va avoir le temps de s'éteindre avant que quiconque passe à travers..
Avec les ordinateurs quantiques qui arriveront dans quelques années, cela ne sera plus vrai :wink:
Humm je ne voudrais pas faire mon rabat-joie mais j'ai parlé des ordinateurs quantiques avec mon prof à l'université (un chercheur) et il m'a dit que les technologies actuelles n'étaient pas encore suffisamment avancée pour permettre la construction de telles machines.
De plus, ces machines seraient très rapide pour le calcul mais beaucoup plus lente en ce qui concerne l'affichage des résultats (je ne sais plus pourquoi). Enfin bref tout cela pour dire que c'est pas pour tout de suite quand même.
Avatar de l’utilisateur
SPH
Messages : 4947
Inscription : mer. 09/nov./2005 9:53

Re: Read/ Write Power Encoded String

Message par SPH »

Guimauve a écrit :
SPH a écrit :
Ce que je cherche à faire est simple, c'est de rendre illisible les textes écris dans le fichier.
Ouai.... Donc, j'avais bien compris que c'était de la CRYPTOGRAPHIE :!: :!: :!: :wink:

PS : je peux faire 10 fois moins long et 10 fois plus sécurisé
À ce que je vois tu n'as rien compris...

JE NE CHERCHE PAS À AVOIR LA MOINDRE SÉCURITÉ AVEC CES CODES !!!!

Si tu pouvais simplement comprendre ça, cela serait très apprécié.

A+
Guimauve
Tu sembles pourtant avoir expliqué exactement le contraire :
Le seul emmerdement est que si on ouvre le fichier avec Bloc-Notes on peut lire facilement les chaînes écrites et changer le texte mais si on ne change pas la valeur indiquant la longueur de la chaine, le chargement va planter solide. Ce que je cherche à faire est simple, c'est de rendre illisible les textes écris dans le fichier. L'idée n'est d'avoir la super sécurité de la mort qui tue à coup d'engin de destruction massif alors pourquoi se priver de faire comme ceci ....

!i!i!i!i!i!i!i!i!i!
!i!i!i!i!i!i!
!i!i!i!
//// Informations ////
Intel Core i7 4770 64 bits - GTX 650 Ti
Version de PB : 6.12LTS- 64 bits
Répondre