private byte[] GetByteArrayAttribute(CMSG_GETPARAM_TYPE param, uint index) { // Get the length of the attribute uint valueLength = 0; NativeUtils.ThrowIfFailed(NativeMethods.CryptMsgGetParam( _handle, param, index, null, ref valueLength)); // Now allocate some memory for it byte[] data = new byte[(int)valueLength]; // Get the actual digest NativeUtils.ThrowIfFailed(NativeMethods.CryptMsgGetParam( _handle, param, index, data, ref valueLength)); return(data); }
private byte[] GetByteArrayAttribute(CMSG_GETPARAM_TYPE param, uint index) { uint valueLength = 0; NativeUtilities.ThrowIfFailed(NativeMethods.CryptMsgGetParam( _handle, param, index, null, ref valueLength)); var data = new byte[(int)valueLength]; NativeUtilities.ThrowIfFailed(NativeMethods.CryptMsgGetParam( _handle, param, index, data, ref valueLength)); return(data); }
internal static extern bool CryptMsgGetParam( SafeCryptMsgHandle hCryptMsg, CMSG_GETPARAM_TYPE dwParamType, uint dwIndex, IntPtr pvData, ref uint pcbData);
public static extern bool CryptMsgGetParam( SafeCryptMsgHandle hCryptMsg, CMSG_GETPARAM_TYPE dwParamType, uint dwIndex, byte[] pvData, ref uint pcbData);
public static extern bool CryptMsgGetParam( SafeCryptMsgHandle hCryptMsg, CMSG_GETPARAM_TYPE dwParamType, uint dwIndex, byte[] pvData, ref uint pcbData);
private byte[] GetByteArrayAttribute(CMSG_GETPARAM_TYPE param, uint index) { // Get the length of the attribute uint valueLength = 0; NativeUtils.ThrowIfFailed(NativeMethods.CryptMsgGetParam( _handle, param, index, null, ref valueLength)); // Now allocate some memory for it byte[] data = new byte[(int)valueLength]; // Get the actual digest NativeUtils.ThrowIfFailed(NativeMethods.CryptMsgGetParam( _handle, param, index, data, ref valueLength)); return data; }