Net.Pkcs11Interop.HighLevelAPI81.Session.SignEncrypt C# (CSharp) Method

SignEncrypt() public method

Signs and encrypts data
public SignEncrypt ( Mechanism signingMechanism, ObjectHandle signingKeyHandle, Mechanism encryptionMechanism, ObjectHandle encryptionKeyHandle, Stream inputStream, Stream outputStream ) : byte[]
signingMechanism Mechanism Signing mechanism
signingKeyHandle ObjectHandle Handle of the signing key
encryptionMechanism Mechanism Encryption mechanism
encryptionKeyHandle ObjectHandle Handle of the encryption key
inputStream Stream Input stream from which data to be processed should be read
outputStream Stream Output stream where encrypted data should be written
return byte[]
        public byte[] SignEncrypt(Mechanism signingMechanism, ObjectHandle signingKeyHandle, Mechanism encryptionMechanism, ObjectHandle encryptionKeyHandle, Stream inputStream, Stream outputStream)
        {
            if (this._disposed)
                throw new ObjectDisposedException(this.GetType().FullName);

            if (signingMechanism == null)
                throw new ArgumentNullException("signingMechanism");
            
            if (signingKeyHandle == null)
                throw new ArgumentNullException("signingKeyHandle");
            
            if (encryptionMechanism == null)
                throw new ArgumentNullException("encryptionMechanism");
            
            if (encryptionKeyHandle == null)
                throw new ArgumentNullException("encryptionKeyHandle");
            
            if (inputStream == null)
                throw new ArgumentNullException("inputStream");

            if (outputStream == null)
                throw new ArgumentNullException("outputStream");

            return SignEncrypt(signingMechanism, signingKeyHandle, encryptionMechanism, encryptionKeyHandle, inputStream, outputStream, 4096);
        }

Same methods

Session::SignEncrypt ( Mechanism signingMechanism, ObjectHandle signingKeyHandle, Mechanism encryptionMechanism, ObjectHandle encryptionKeyHandle, Stream inputStream, Stream outputStream, int bufferLength ) : byte[]
Session::SignEncrypt ( Mechanism signingMechanism, ObjectHandle signingKeyHandle, Mechanism encryptionMechanism, ObjectHandle encryptionKeyHandle, byte data, byte &signature, byte &encryptedData ) : void