home *** CD-ROM | disk | FTP | other *** search
- #include "surround.h"
-
- main (int argc, char *argv[])
- {
- char nome[256], email[256], teste[500], teste1[500], teste2[500],
- country[256];
-
- /* TESTA SE O ARQUIVO EXISTE */
- if(!(ExisteArquivo(argv[1])))
- {
- printf("[%s]: Arquivo nao existe...\n", argv[1]);
- exit(1);
- }
-
- /* LE DO ARQUIVO DE PEDIDO AS INFORMACOES PARA O CALCULO */
- strcpy(nome, LeRegistroDB(argv[1], "YourName"));
- strcpy(email, LeRegistroDB(argv[1], "YourEmail"));
- strcpy(country, LeRegistroDB(argv[1], "YourCountry"));
-
- /* CRIPTOGRAVA A PRIMEIRA PARTE */
- sprintf(teste, "%s%s%s", nome, email, country);
- strcpy(teste, CriptografiaSimples(teste, 0));
-
- strcpy(teste1, StringAscii(teste, 69));
- strcpy(teste2, StringAscii(teste, 96));
-
- GravaRegistroDB(argv[1], teste1, "KeyRegister", "a");
- if(!strcmp(argv[2], "PaY"))
- GravaRegistroDB(argv[1], teste2, "KeyRegisterReal", "a");
- GravaRegistroDB(argv[1], "Import this msg in Freedom Prefs, Register Import!!!", "Obs", "a");
- exit(1);
- }
-