aboutsummaryrefslogtreecommitdiff
path: root/Src/libvp6/include/On2Decrypt.h
diff options
context:
space:
mode:
authorJef <jef@targetspot.com>2024-09-24 08:54:57 -0400
committerJef <jef@targetspot.com>2024-09-24 08:54:57 -0400
commit20d28e80a5c861a9d5f449ea911ab75b4f37ad0d (patch)
tree12f17f78986871dd2cfb0a56e5e93b545c1ae0d0 /Src/libvp6/include/On2Decrypt.h
parent537bcbc86291b32fc04ae4133ce4d7cac8ebe9a7 (diff)
downloadwinamp-20d28e80a5c861a9d5f449ea911ab75b4f37ad0d.tar.gz
Initial community commit
Diffstat (limited to 'Src/libvp6/include/On2Decrypt.h')
-rw-r--r--Src/libvp6/include/On2Decrypt.h75
1 files changed, 75 insertions, 0 deletions
diff --git a/Src/libvp6/include/On2Decrypt.h b/Src/libvp6/include/On2Decrypt.h
new file mode 100644
index 00000000..58bd18c5
--- /dev/null
+++ b/Src/libvp6/include/On2Decrypt.h
@@ -0,0 +1,75 @@
+//==========================================================================
+//
+// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
+// KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR
+// PURPOSE.
+//
+// Copyright (c) 1999 - 2001 On2 Technologies Inc. All Rights Reserved.
+//
+//--------------------------------------------------------------------------
+#if !defined(ON2DECRYPT_H)
+#define ON2DECRYPT_H
+
+//______________________________________________________________________________
+//
+// On2Decrypt.h
+// test api for testing the encryption code in on2crypt.h
+//--------------------------------------------------------------------------
+
+#ifdef _USRDLL
+#define DLLExport __declspec(dllexport)
+#else
+#define DLLExport
+#endif
+
+#define DLLCC __stdcall
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+typedef void* HOn2Decryptor;
+
+DLLExport int DLLCC MakeDecryptor(unsigned char* pDRMX, int iDRMXLength, HOn2Decryptor* phOn2Decryptor);
+//***************************************************************************************
+// Name : MakeDecryptor
+// Description: set up an decryption session
+// Inputs : pDRMX -> information to be used by decryptor to set up decryption session
+// iDRMXLength -> number of bytes used in pDRMX
+// Outputs : phOn2Decryptor -> pointer to an decryption session
+// Returns : 0 = success
+//***************************************************************************************
+
+DLLExport int DLLCC DecryptBytes(HOn2Decryptor hOn2Decryptor, unsigned char* pBufferIn, int iSizeIn, unsigned char* pBufferOut, int iSizeOutMax, int* piSizeOut);
+//***************************************************************************************
+// Name : DecryptBytes
+// Description: decrypts bytes in input buffer and stores them to the output buffer
+// Inputs : hOn2Decryptor -> handle of decryption sesion to use ( from make decryptor)
+// : pBufferIn -> buffer holding bytes to decrypt
+// iSizeIn -> number of bytes to decrypt of that buffer
+// Outputs : pBufferOut -> buffer for holding decrypted bytes
+// iSizeOutMax -> maximum number of bytes to write to pBufferOut
+// piSizeOut -> number of bytes actually written to pbufferout
+// Returns : 0 = success
+//***************************************************************************************
+
+DLLExport int DLLCC DeleteDecryptor(HOn2Decryptor hOn2Decryptor);
+//***************************************************************************************
+// Name : DeleteDecryptor
+// Description: ends the decryption session and cleans up
+// Inputs : hOn2Decryptor -> handle of decryption sesion to use ( from make decryptor)
+// Outputs :
+// Returns : 0 = success
+//***************************************************************************************
+
+typedef int (DLLCC *PFNMakeDecryptor)(unsigned char* pDRMX, int iDRMXLength, HOn2Decryptor* phOn2Decryptor);
+typedef int (DLLCC *PFNDecryptBytes)(HOn2Decryptor hOn2Decryptor, unsigned char* pBufferIn, int iSizeIn, unsigned char* pBufferOut, int iSizeOutMax, int* piSizeOut);
+typedef int (DLLCC *PFNDeleteDecryptor)(HOn2Decryptor hOn2Decryptor);
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif // ON2DECRYPT_H