|
begin process at 2008 05 16 07:00:27
Derniers logiciels
|
Trouver une ressource
Vous ne trouvez pas de réponse à votre problème ? Alors posez la question dans le forum.
Souvenez-vous qu'il n'y a jamais de question bête, mais rester dans l'ignorance parce que l'on n'ose pas poser une question, ça c'est une erreur !
CRYPTOGRAPH
Information sur la source
Description
bon c est un petit programme qui permet de ' crypter ' une image . La fonction de cryptage se fait ac shr et xor et le decryptage ac xor et shl Ce n est pas un reel cryptage je pense mais Le but n est pas de faire un programme de cryptage mais juste une application marrante . J ai mis un exemple et les valeurs pr le decrypter sont 4 , la deuxieme il ne faut pas y toucher
Source
- TypeRGB = Record
- Bleu, Vert, Rouge : Byte;
- End;
- TypeTRGBArray = Array [0..12000] Of TypeRGB; // pour la largeur de l'image
- TypePRGBArray = ^TypeTRGBArray;
-
-
- procedure PRDecrypter(DEimage:Timage;Gauge1:Tgauge;ValSHL:integer;ValXor:integer);
- var
- Scan : TypePRGBArray;
- x,y:integer;
- ir,iv,ib,mv,mb,mr,Fin: Integer;
- begin
- gauge1.MaxValue:=DEimage.Picture.Bitmap.Height-1 ;
-
- for y:=0 to DEimage.Picture.Bitmap.Height-1 do
- begin
- gauge1.Progress:=y;
- Scan := DEimage.picture.Bitmap.ScanLine[Y];
- for x:=0 to DEimage.Picture.Bitmap.Width-1 do
- begin
-
- // Valeurs en rouge vert et bleu
- mR := Scan[X].Rouge;
- mV := Scan[X].Vert;
- mB := Scan[X].Bleu;
- // Transo en rgb
- fin:=rgb(mr,mv,mb);
-
- fin:=rgb(Scan[X].Rouge,Scan[X].Vert,Scan[X].Bleu ) xor ValXor;
-
- Scan[X].Rouge := getRvalue(fin);
- Scan[X].Vert := getGvalue(fin);
- Scan[X].Bleu := getBvalue(fin);
-
- end;
- end;
- DEimage.Refresh;
- gauge1.Progress:=0;
-
- for y:=0 to DEimage.Picture.Bitmap.Height-1 do
- begin
- gauge1.Progress:=y;
- Scan := DEimage.picture.Bitmap.ScanLine[Y];
- for x:=0 to DEimage.Picture.Bitmap.Width-1 do
- begin
-
- // Valeurs en rouge vert et bleu
- mR := Scan[X].Rouge;
- mV := Scan[X].Vert;
- mB := Scan[X].Bleu;
- // Transo en rgb
- fin:=rgb(mr,mv,mb);
-
- fin:=rgb(Scan[X].Rouge,Scan[X].Vert,Scan[X].Bleu ) shl ValSHL;
-
-
- Scan[X].Rouge := getRvalue(fin);
- Scan[X].Vert := getGvalue(fin);
- Scan[X].Bleu := getBvalue(fin);
-
-
-
- end;
- end;
-
- DEimage.Refresh;
- gauge1.Progress:=0;
- end;
-
-
-
- procedure PrCrypter(image:Timage;Gauge1:Tgauge;ValSHR:integer;ValXOR:integer);
- var
- Scan : TypePRGBArray;
- x,y:integer;
- ir,iv,ib,mv,mb,mr,Fin: Integer;
- begin
-
-
- gauge1.MaxValue:=image.Picture.Bitmap.Height-1 ;
-
- for y:=0 to image.Picture.Bitmap.Height-1 do
- begin
- gauge1.Progress:=y;
- Scan := image.picture.Bitmap.ScanLine[Y];
- for x:=0 to image.Picture.Bitmap.Width-1 do
- begin
-
- // Valeurs en rouge vert et bleu
- mR := Scan[X].Rouge;
- mV := Scan[X].Vert;
- mB := Scan[X].Bleu;
- // Transo en rgb
- fin:=rgb(mr,mv,mb);
-
- fin:=rgb(Scan[X].Rouge,Scan[X].Vert,Scan[X].Bleu ) shr ValSHR;
-
- Scan[X].Rouge := getRvalue(fin);
- Scan[X].Vert := getGvalue(fin);
- Scan[X].Bleu := getBvalue(fin);
-
- end;
- end;
-
- image.Refresh;
- gauge1.Progress:=0;
-
- for y:=0 to image.Picture.Bitmap.Height-1 do
- begin
- gauge1.Progress:=y;
- Scan := image.picture.Bitmap.ScanLine[Y];
- for x:=0 to image.Picture.Bitmap.Width-1 do
- begin
-
- // Valeurs en rouge vert et bleu
- mR := Scan[X].Rouge;
- mV := Scan[X].Vert;
- mB := Scan[X].Bleu;
- // Transo en rgb
- fin:=rgb(mr,mv,mb);
-
- fin:=rgb(Scan[X].Rouge,Scan[X].Vert,Scan[X].Bleu ) xor ValXOR;
-
- Scan[X].Rouge := getRvalue(fin);
- Scan[X].Vert := getGvalue(fin);
- Scan[X].Bleu := getBvalue(fin);
-
- end;
- end;
- image.Refresh;
- gauge1.Progress:=0;
-
- end;
TypeRGB = Record
Bleu, Vert, Rouge : Byte;
End;
TypeTRGBArray = Array [0..12000] Of TypeRGB; // pour la largeur de l'image
TypePRGBArray = ^TypeTRGBArray;
procedure PRDecrypter(DEimage:Timage;Gauge1:Tgauge;ValSHL:integer;ValXor:integer);
var
Scan : TypePRGBArray;
x,y:integer;
ir,iv,ib,mv,mb,mr,Fin: Integer;
begin
gauge1.MaxValue:=DEimage.Picture.Bitmap.Height-1 ;
for y:=0 to DEimage.Picture.Bitmap.Height-1 do
begin
gauge1.Progress:=y;
Scan := DEimage.picture.Bitmap.ScanLine[Y];
for x:=0 to DEimage.Picture.Bitmap.Width-1 do
begin
// Valeurs en rouge vert et bleu
mR := Scan[X].Rouge;
mV := Scan[X].Vert;
mB := Scan[X].Bleu;
// Transo en rgb
fin:=rgb(mr,mv,mb);
fin:=rgb(Scan[X].Rouge,Scan[X].Vert,Scan[X].Bleu ) xor ValXor;
Scan[X].Rouge := getRvalue(fin);
Scan[X].Vert := getGvalue(fin);
Scan[X].Bleu := getBvalue(fin);
end;
end;
DEimage.Refresh;
gauge1.Progress:=0;
for y:=0 to DEimage.Picture.Bitmap.Height-1 do
begin
gauge1.Progress:=y;
Scan := DEimage.picture.Bitmap.ScanLine[Y];
for x:=0 to DEimage.Picture.Bitmap.Width-1 do
begin
// Valeurs en rouge vert et bleu
mR := Scan[X].Rouge;
mV := Scan[X].Vert;
mB := Scan[X].Bleu;
// Transo en rgb
fin:=rgb(mr,mv,mb);
fin:=rgb(Scan[X].Rouge,Scan[X].Vert,Scan[X].Bleu ) shl ValSHL;
Scan[X].Rouge := getRvalue(fin);
Scan[X].Vert := getGvalue(fin);
Scan[X].Bleu := getBvalue(fin);
end;
end;
DEimage.Refresh;
gauge1.Progress:=0;
end;
procedure PrCrypter(image:Timage;Gauge1:Tgauge;ValSHR:integer;ValXOR:integer);
var
Scan : TypePRGBArray;
x,y:integer;
ir,iv,ib,mv,mb,mr,Fin: Integer;
begin
gauge1.MaxValue:=image.Picture.Bitmap.Height-1 ;
for y:=0 to image.Picture.Bitmap.Height-1 do
begin
gauge1.Progress:=y;
Scan := image.picture.Bitmap.ScanLine[Y];
for x:=0 to image.Picture.Bitmap.Width-1 do
begin
// Valeurs en rouge vert et bleu
mR := Scan[X].Rouge;
mV := Scan[X].Vert;
mB := Scan[X].Bleu;
// Transo en rgb
fin:=rgb(mr,mv,mb);
fin:=rgb(Scan[X].Rouge,Scan[X].Vert,Scan[X].Bleu ) shr ValSHR;
Scan[X].Rouge := getRvalue(fin);
Scan[X].Vert := getGvalue(fin);
Scan[X].Bleu := getBvalue(fin);
end;
end;
image.Refresh;
gauge1.Progress:=0;
for y:=0 to image.Picture.Bitmap.Height-1 do
begin
gauge1.Progress:=y;
Scan := image.picture.Bitmap.ScanLine[Y];
for x:=0 to image.Picture.Bitmap.Width-1 do
begin
// Valeurs en rouge vert et bleu
mR := Scan[X].Rouge;
mV := Scan[X].Vert;
mB := Scan[X].Bleu;
// Transo en rgb
fin:=rgb(mr,mv,mb);
fin:=rgb(Scan[X].Rouge,Scan[X].Vert,Scan[X].Bleu ) xor ValXOR;
Scan[X].Rouge := getRvalue(fin);
Scan[X].Vert := getGvalue(fin);
Scan[X].Bleu := getBvalue(fin);
end;
end;
image.Refresh;
gauge1.Progress:=0;
end;
Conclusion
Marche ac SCanline
Bon pr savoir decrypter son image faut pas perdre les 2 valeurs de cryptage
PS: si vous mettez une valeurs de cryptage trop grand a shr votre image sera mauvaise
Fichier Zip
Pour les "Membres Club", vous pouvez télécharger directement un fichier contenu dans le zip sans télécharger le zip en entier !
Télécharger le zip
Historique
- 16 janvier 2006 21:09:59 :
- tromper de zip et d image la total !!!
- 17 janvier 2006 21:32:53 :
- Pour delphiProg
Sources de la même categorie
Commentaires
Discussions en rapport avec ce code source
|
CalendriCode
| | | L | M | M | J | V | S | D |
| | | | 1 | 2 | 3 | 4 |
| 5 | 6 | 7 | 8 | 9 | 10 | 11 |
| 12 | 13 | 14 | 15 | 16 | 17 | 18 |
| 19 | 20 | 21 | 22 | 23 | 24 | 25 |
| 26 | 27 | 28 | 29 | 30 | 31 | |
|
Téléchargements
Logiciels à télécharger sur le même thème :
|
|