Skip to main content

AccessTr.neT


Lisanslama

Çözüldü #9

VB.NET ANA KONTROL PANELİ ŞİFRELEME OLUŞTURMA

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles Button1.Click
If TextBox4.Text = "" Then
MsgBox("Enter even number")
Exit Sub
Else
End If
If TextBox5.Text = "" Then
MsgBox("Enter odd number")
Exit Sub
Else
End If
Dim obj As New System.Random()
TextBox1.Text = obj.Next(1000, 9999).ToString
Rand1 = Val(TextBox1.Text.Chars(0))
Rand2 = Val(TextBox1.Text.Chars(1))
Rand3 = Val(TextBox1.Text.Chars(2))
Rand4 = Val(TextBox1.Text.Chars(3))
total = (Rand1 + Rand2 + Rand3) * Rand4
TextBox3.Text = (RandomString(CInt("9")))
text1 = (TextBox3.Text.Chars(0))
text2 = (TextBox3.Text.Chars(1))
text3 = (TextBox3.Text.Chars(2))
text4 = (TextBox3.Text.Chars(3))
text5 = (TextBox3.Text.Chars(4))
text6 = (TextBox3.Text.Chars(5))
text7 = (TextBox3.Text.Chars(6))
text8 = (TextBox3.Text.Chars(7))
even = TextBox4.Text
odd = TextBox5.Text
If total = "60" Then
TextBox2.Text = Rand1 & text1 & "-" & even & Rand2 & text3 & "-" & text4 &
Rand3 & text5 & odd & "-" & Rand4 & text8 & text7
Else
End If
End Sub

SHA VE RS4 ŞİFRELEME MODÜL KODLARI

01 </code>C#
02 [WebMethod]
03 public string Encrypt(string stringToEncrypt)
04 {
05 byte[] buffer = Encoding.UTF8.GetBytes(stringToEncrypt);
06 return Encoding.UTF8.GetString(rsa.Encrypt(buffer,false));
07 }
08 [WebMethod]
09 public string Decrypt(string stringToDecrypt)
10 {
11 byte[] buffer = Encoding.UTF8.GetBytes(stringToDecrypt);
12 return Encoding.UTF8.GetString(rsa.Decrypt(buffer,false));
13 }

14 VB.NET

15 _
16 Public Function Encrypt(ByVal stringToEncrypt As String) As String
17 Dim buffer As Byte() = Encoding.UTF8.GetBytes(stringToEncrypt)
18 Return Encoding.UTF8.GetString(rsa.Encrypt(buffer, False))
19 End Function
20 _
21 Public Function Decrypt(ByVal stringToDecrypt As String) As String
22 Dim buffer As Byte() = Encoding.UTF8.GetBytes(stringToDecrypt)
23 Return Encoding.UTF8.GetString(rsa.Decrypt(buffer, False))
24 End Function

25 C++.NET

26 [System::Web::Services::WebMethod]
27 String __gc* Encrypt(String __gc * stringToEncrypt)
28 {
29 Byte buffer[] = Encoding::UTF8->GetBytes(stringToEncrypt);
30 return Encoding::UTF8->GetString(rsa->Encrypt(buffer,false));
31 }
32 [System::Web::Services::WebMethod]
33 String __gc* Decrypt(String __gc * stringToDecrypt)
34 {
35 Byte buffer[] = Encoding::UTF8->GetBytes(stringToDecrypt);
36 return Encoding::UTF8->GetString(rsa->Decrypt(buffer,false));
37 }
38 J#
39 /** @attribute WebMethod() */
40 public String Encrypt(String stringToEncrypt)
41 {
42 ubyte[] buffer = Encoding.get_UTF8().GetBytes(stringToEncrypt);
43 return Encoding.get_UTF8().GetString( rsa.Encrypt(buffer,false) );
44 }
45 /** @attribute WebMethod() */
46 public String Decrypt(String stringToDecrypt)
47 {
48 ubyte[] buffer = Encoding.get_UTF8().GetBytes(stringToDecrypt);
49 return Encoding.get_UTF8().GetString( rsa.Decrypt(buffer,false) );
50 }<code>

KRİPTOLAMA YAPAY ZEKA FONKSİYONA ERİŞİM

#include <stdio.h>
#include <conio.h>
#include <stdlib.h>
#include <io.h>
int main(){
struct basak1{
char a;
}x;
struct basakl2{
char b;
}y;
FILE *dosya1,*dosya2;
char ad1[100]={0},ad2[100]={0};
char cevap=0;
int i=0,d=2,f1,f2;
y.b=' ';
textcolor(11);
printf("\n %c",201); for(f1=0;f1<76;f1++){printf("%c",205);} printf("%c ",187);
printf(" %c%77c\n %c%77c\n %c%77c\n %c \t\t\tDosya %cifreleme Program%c
V1.0",186,186,186,186,186,186,186,158,141);
printf("%26c\n %c%77c\n %c%77c\n %c%77c\n %c\t1-
)%cifreleme%59c",186,186,186,186,186,186,186,186,1 58,186);
printf("\n %c%77c\n %c\t2-)De%cifreleme%57c",186,186,186,159,186);
printf("\n %c%77c\n %c\t3-)Yard%cm%62c",186,186,186,141,186);
printf("\n %c%77c\n %c\t4-)%c%ck%c%c%63c",186,186,186,128,141,141,159,186);
printf("\n %c%77c\n %c%77c\n %c\tL%ctfen yapmak istedi%ciniz i%clemin numaras%cn%c
girin:%20c",186,186,186,186,186,129,167,159,141,14 1,186);
printf("\n %c%77c\n %c%77c\n %c%77c",186,186,186,186,186,186,186);
printf("\n %c",200); for(f2=0;f2<76;f2++){printf("%c",205);} printf("%c",188);
gotoxy(32,24);cprintf("ISW-basakl %cisraelloveme%c%C",152,128,184);
gotoxy(60,19);
cevap=getch();
clrscr();
if(cevap=='1'){
printf("\n%cifrelenecek dosyan%cn ad%cn%c girin:",158,141,141,141);
scanf("%s",&ad1);
for(i=0;i<18;i++){
if(ad1=='0')break;
}
ad1='\0';
printf("\n\nYeni olu%cturulacak %cifreli dosyan%cn ad%cn%c girin:",159,159,141,141,141);
scanf("%s",&ad2);
for(i=0;i<18;i++){
if(ad2=='0')break;
}
ad2='\0';
fcloseall();
dosya1=fopen(ad1,"r");
dosya2=fopen(ad2,"w");
fseek(dosya1,0,SEEK_SET); fseek(dosya2,0,SEEK_SET);
for(i=0;i<filelength(fileno(dosya1))/sizeof(x);i++){
fread(&x,1,1,dosya1);
x.a=(x.a)+d;
fwrite(&x,1,1,dosya2);
}
fclose(dosya1); fclose(dosya2);
}
if(cevap=='2'){
printf("\nDe%cifre edilecek dosyan%cn ad%cn%c girin:",159,141,141,141);
scanf("%s",&ad1);
for(i=0;i<18;i++){
if(ad1=='0')break;
}
ad1='\0';
printf("\n\nYeni olu%cturulacak de%cifreli dosyan%cn ad%cn%c girin:",159,159,141,141,141);
scanf("%s",&ad2);
for(i=0;i<18;i++){
if(ad2=='0')break;
}
ad2='\0';
fcloseall();
dosya1=fopen(ad1,"r");
dosya2=fopen(ad2,"w");
fseek(dosya1,0,SEEK_SET); fseek(dosya2,0,SEEK_SET);
for(i=0;i<filelength(fileno(dosya1))/sizeof(x);i++){
fread(&x,1,1,dosya1);
x.a=(x.a)-d;
fwrite(&x,1,1,dosya2);
}
fclose(dosya1); fclose(dosya2);
}
if(cevap=='4') exit(0);
getch();
return 0;
}
BALONCUK DÖNGÜ:
#include<iostream.h>
#include<conio.h>
#include<algorithm>
template <class T>
void swap (T& a, T& b);
{
}
const N=6;
main ()
{
int i,j;
int temp;
int number[N];
for (i=0;i<N;i++)
{
cout<<" enter " <<i<< " number :"<<endl;
cin >>number;
cout<<endl;
}
for (i=0;i<N-1;i++)
for (j=i+1;j<N;j++)
if (number <number [j])
{
temp=number;
number=number[j];
number[j]=temp;
swap(number,number[j];
}
for (i=0;i<N;i++)
cout<<number<<" ";
getch();
}
DATA BASE ŞİFRE KİTAPLIĞINA ERİŞİM
#include <stdio.h>
#include <mysql/mysql.h>
int main(){
MYSQL *mysql;
MYSQL_RES *result;
MYSQL_ROW row;
MYSQL *connection;
int qt;
mysql_init(mysql);
connection = mysql_real_connect(mysql, "localhost", "root", "45618396",
"test", 0, NULL, 0);
if (connection == NULL){
printf(mysql_error(mysql));
return 1;
}
qt = mysql_query(connection, "select * from fusion_admin");
if (qt != 0)
{
printf(mysql_error(connection));
return 1;
}
result = mysql_store_result(connection);
row = mysql_fetch_row(result);
while((row = mysql_fetch_row(result)) != NULL ) {
printf("int: %s, char: %s\n", row[0], row[1]);
}
mysql_close(connection);
mysql_free_result(result);
getchar();
return 0;
}
BELLEK AYIRMA VE PARABOL DİZİ KONTROLÜ
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
int main(int argc, char *argv[])
{
FILE *f;
char s[1024], bdaddr[32], name[256], hash[1024];
int verbose, win;
if (argc!=3) return 1; /* ObexSender will always pass two parameters
*/
if (!(f=fopen(argv[2],"rt"))) return 2; /* First parameter is bdaddr,
second is config file name */
/* Read config file */
while (fgets(s,sizeof(s),f)) {
if (*s && s[strlen(s)-1]=='\n') s[strlen(s)-1]=0;
if (!strncmp(s,"bdaddr ",7)) strcpy(bdaddr,s+7);
if (!strncmp(s,"name ",5)) strcpy(name,s+5);
if (!strncmp(s,"hash ",5)) strcpy(hash,s+5);
if (!strncmp(s,"verbose ",8)) verbose=atoi(s+8);
}
fclose(f);
/* Make lottery! */
srand(time(NULL));
win=rand() & 1 ; /* 50% chance to win */
/* Write fakename to reply config file */
if (!(f=fopen(argv[2],"wt"))) return 3;
if (win) fprintf(f,"file you_won.txt\n");
else fprintf(f,"file you_lost.txt\n");
fclose(f);
/* Write content file */
/* In this example we write the file. In real life you usually want
to symlink() it. */
sprintf(s,"%s.reply",argv[2]);
if (!(f=fopen(s,"wt"))) return 4;
if (win) fprintf(f,"result, %s!\n",name);
else fprintf(f,"One minute, %s, one minute.\n",name);
fclose(f);
/* Return ok */
return 0;
}
Cevapla

Bir hesap oluşturun veya yorum yapmak için giriş yapın

Yorum yapmak için üye olmanız gerekiyor

ya da

Bu Konudaki Yorumlar
Lisanslama - Yazar: qnill - 24/09/2010, 15:17
Cvp: Lisanslama - Yazar: alpeki99 - 24/09/2010, 15:31
Cvp: Lisanslama - Yazar: alpeki99 - 24/09/2010, 15:37
Cvp: Lisanslama - Yazar: beab05 - 24/09/2010, 18:08
Cvp: Lisanslama - Yazar: alpeki99 - 24/09/2010, 18:12
Cvp: Lisanslama - Yazar: qnill - 24/09/2010, 18:12
Cvp: Lisanslama - Yazar: Ziyaretçi - 25/09/2010, 03:50
Cvp: Lisanslama - Yazar: qnill - 26/09/2010, 22:01
Cvp: Lisanslama - Yazar: Ziyaretçi - 29/09/2010, 13:14
Cvp: Lisanslama - Yazar: qnill - 29/09/2010, 13:15