예제 #1
0
        public CKR C_EX_PKCS7Sign(NativeULong session,
                                  byte[] data, NativeULong cert,
                                  out IntPtr envelope, out NativeULong encelopeLen,
                                  NativeULong privateKey,
                                  NativeULong[] certificates,
                                  NativeULong flags)
        {
            if (_disposed)
            {
                throw new ObjectDisposedException(GetType().FullName);
            }

            NativeULong dataLength = 0;

            if (data != null)
            {
                dataLength = (NativeULong)(data.Length);
            }

            NativeULong certificatesLength = 0;

            if (certificates != null)
            {
                certificatesLength = (NativeULong)(certificates.Length);
            }

            NativeULong rv = _rutokenDelegates.C_EX_PKCS7Sign(session, data, dataLength,
                                                              cert, out envelope, out encelopeLen,
                                                              privateKey,
                                                              certificates, certificatesLength,
                                                              flags);

            return((CKR)rv);
        }