// For descriptions of the input parameters, see the 64-bit version of EncryptBufferXTS(). void DecryptBufferXTS (unsigned __int8 *buffer, TC_LARGEST_COMPILER_UINT length, const UINT64_STRUCT *startDataUnitNo, unsigned int startCipherBlockNo, unsigned __int8 *ks, unsigned __int8 *ks2, int cipher) { // Decrypt all ciphertext blocks in the buffer EncryptDecryptBufferXTS32 (buffer, length, startDataUnitNo, startCipherBlockNo, ks, ks2, cipher, TRUE); }
// For descriptions of the input parameters, see the 64-bit version of EncryptBufferXTS(). void DecryptBufferXTS (unsigned __int8 *buffer, GST_LARGEST_COMPILER_UINT length, const UINT64_STRUCT *startDataUnitNo, unsigned int startCipherBlockNo, unsigned __int8 *ks, unsigned __int8 *ks2, int cipher) { // Decrypt all ciphertext blocks in the buffer if (CipherGetBlockSize(cipher) == 8) DecryptBufferXTS8Byte(buffer, length, startDataUnitNo, startCipherBlockNo, ks, ks2, cipher); else EncryptDecryptBufferXTS32 (buffer, length, startDataUnitNo, startCipherBlockNo, ks, ks2, cipher, TRUE); }