This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| DECLARE | |
| PROCEDURE sp_test_pkcs7 (pData IN RAW, pBlockSize IN PLS_INTEGER) | |
| IS | |
| vInData RAW(100); | |
| vDataPadded RAW(100); | |
| vDataTrimmed RAW(100); | |
| BEGIN | |
| vInData := hextoraw(pData); | |
| vDataPadded := fn_pkcs7_pad(vInData, pBlockSize); | |
| vDataTrimmed := fn_pkcs7_trim(vDataPadded); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| CREATE OR REPLACE FUNCTION fn_PKCS7_Trim(pData IN RAW) | |
| RETURN RAW | |
| IS | |
| vPadSize PLS_INTEGER; | |
| vPadValue RAW(2); | |
| BEGIN | |
| vPadValue := utl_raw.substr(pData, -1, 1); | |
| vPadSize := to_number(rawtohex(vPadValue), 'XX'); | |
| RETURN utl_raw.substr(pData, 1, utl_raw.length(pData) - vPadSize); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| CREATE OR REPLACE FUNCTION fn_PKCS7_Pad(pData IN RAW, pBlockSize IN PLS_INTEGER) | |
| RETURN RAW | |
| IS | |
| vPadSize PLS_INTEGER; | |
| vPadValue RAW(2); | |
| BEGIN | |
| vPadSize := pBlockSize - MOD(utl_raw.length(pData), pBlockSize); | |
| vPadValue := hextoraw(ltrim(to_char(vPadSize, 'XX'))); | |
| RETURN utl_raw.concat(pData, utl_raw.copies(vPadValue, vPadSize)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @echo off | |
| REM # Send To Backup Script | |
| REM # Author - Matt Little (http://matthewjlittle.com) | |
| REM # Adam Caudill (http://adamcaudill.com) | |
| REM # | |
| REM # To install: | |
| REM # | |
| REM # (windows 7): | |
| REM # Goto Start->Run. Type in shell:sendto |