Exemple #1
0
int CRYPT_CreateKeys(CRYPT_SETUP* cs,void* key,unsigned char type)
{
    memset(cs, 0, sizeof(CRYPT_SETUP));
    cs->type = type;
    switch (cs->type)
    {
      case CRYPT_PC:
        CRYPT_PC_CreateKeys(cs,*(uint32_t*)key);
        break;
      case CRYPT_GAMECUBE:
        CRYPT_GC_CreateKeys(cs,*(uint32_t*)key);
        break;
      case CRYPT_BLUEBURST:
        CRYPT_BB_CreateKeys(cs,key);
        break;
      default:
        return 0;
    }
    return 1;
}
Exemple #2
0
bool CRYPT_CreateKeys(CRYPT_SETUP* cs,void* key,unsigned char type)
{
    ZeroMemory(cs,sizeof(CRYPT_SETUP));
    cs->type = type;
    switch (cs->type)
    {
      case CRYPT_PC:
        CRYPT_PC_CreateKeys(cs,*(unsigned long*)key);
        break;
      case CRYPT_GAMECUBE:
        CRYPT_GC_CreateKeys(cs,*(unsigned long*)key);
        break;
      case CRYPT_BLUEBURST:
        CRYPT_BB_CreateKeys(cs,key);
        break;
      default:
        return false;
    }
    return true;
}