freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

現(xiàn)代密碼學(xué)實(shí)驗(yàn)(題目代碼)-資料下載頁

2025-06-07 20:28本頁面
  

【正文】 e[i]1]。 } memcpy(Return_value,sz_32bits,32)。}int yxyDES::SingleCharToBinary(char ch){ if(ch == 39。139。) return 1。 else return 0。}char yxyDES::SingleBinaryToChar(int i){ if(i == 1) return 39。139。 else return 39。039。}void yxyDES::SetCiphertext(char* value){ memcpy(szCiphertext,value,16)。}char* yxyDES::GetCiphertext(){ return szCiphertext。}void yxyDES::SetPlaintext(char* value){ memcpy(szPlaintext,value,8)。}char* yxyDES::GetPlaintext(){ return szPlaintext。}//any lengthvoid yxyDES::EncryptAnyLength(string szSource){ int iLength = ()。 //if the length is 8 , call EncyptData if(iLength == 8) { EncryptData(szSource)。 memcpy(szFCiphertextAnyLength,szCiphertext,16)。 //set the last char to 39。\039。 szFCiphertextAnyLength[16] = 39。\039。 } //else if the length less than 8 //call FillToEightBits else if(iLength 8) { szSource = FillToEightBits(szSource)。 EncryptData(szSource)。 memcpy(szFCiphertextAnyLength,szCiphertext,16)。 //set the last char to 39。\039。 szFCiphertextAnyLength[16] = 39。\039。 } //else if then lenth bigger than 8 //divide the string to multiparts else if(iLength 8) { int iParts = ceil(iLength/)。 int iResidue = iLength % 8。 string szLast8Bits。 //encrypt the data 8 by 8 except the last part for(int i=0。iiParts1。i++) { string szTmp = (i*8,8)。 EncryptData(szTmp)。 //after call EncryptData //cpoy the temp result to szFCiphertextAnyLength memcpy(szFCiphertextAnyLength + 16*i,szCiphertext,16)。 } //now , the last part if(iResidue != 0) //can39。t be divided exactly by 8 { szLast8Bits = ((iParts1)*8,iResidue)。 szLast8Bits = FillToEightBits(szLast8Bits)。 } else //be divided exactly by 8 { szLast8Bits = ((iParts1)*8,8)。 } //encrypt the last part EncryptData(szLast8Bits)。 memcpy(szFCiphertextAnyLength + 16*(iParts 1),szCiphertext,16)。 //set the last char to 39。\039。 szFCiphertextAnyLength[(iParts)*16] = 39。\039。 }}//fill the data to 8 bitsstring yxyDES::FillToEightBits(string sz){ //length less than 8 , add zero(s) to tail switch(()) { case 7: sz += $。 break。 case 6: sz += $$。 break。 case 5: sz += $$$。 break。 case 4: sz += $$$$。 break。 case 3: sz += $$$$$。 break。 case 2: sz += $$$$$$。 break。 case 1: sz += $$$$$$$。 break。 default: break。 } return sz。}char* yxyDES::GetCiphertextAnyLength(){ return szFCiphertextAnyLength。}void yxyDES::DecryptAnyLength(string szSource){ int iLength = ()。 //if the length is 16 , call DecyptData if(iLength == 16) { DecryptData(szSource)。 memcpy(szFPlaintextAnyLength,szPlaintext,8)。 } //it39。s not impossible the length less than 16 else if(iLength 16) { sprintf(szFPlaintextAnyLength,Please enter your correct cipertext!)。 } //else if then lenth bigger than 16 //divide the string to multiparts else if(iLength 16) { int iParts = ceil(iLength/)。 int iResidue = iLength % 16。 //if the data can39。t be divided exactly by 16 //it39。s meaning the data is a wrong ! if(iResidue != 0) { sprintf(szFPlaintextAnyLength,Please enter your correct cipertext!)。 return。 } //encrypt the data 16 by 16 for(int i=0。iiParts。i++) { string szTmp = (i*16,16)。 DecryptData(szTmp)。 //after call DecryptData //cpoy the temp result to szFPlaintextAnyLength memcpy(szFPlaintextAnyLength + 8*i,szPlaintext,8)。 } } //find and clear the mark //which is add by program when ciphertext is less than 8 CleanPlaintextMark()。}char* yxyDES::GetPlaintextAnyLength(){ return szFPlaintextAnyLength。}void yxyDES::CleanPlaintextMark(){ char szLast7Chars[7] = {0}。 memcpy(szLast7Chars,szFPlaintextAnyLength + strlen(szFPlaintextAnyLength) 7,7)。 for(int i=0。i7。i++) { char* pDest = strrchr(szLast7Chars,39。$39。)。 if(pDest == NULL) { break。 } else
點(diǎn)擊復(fù)制文檔內(nèi)容
教學(xué)教案相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1