C# Class Net.Pkcs11Interop.HighLevelAPI41.Session

Class representing a logical connection between an application and a token
Inheritance: IDisposable
Afficher le fichier Open project: Pkcs11Interop/Pkcs11Interop Class Usage Examples

Méthodes publiques

Méthode Description
CancelFunction ( ) : void

Legacy function which should throw CKR_FUNCTION_NOT_PARALLEL

CloseSession ( ) : void

Closes a session between an application and a token

CopyObject ( ObjectHandle objectHandle, List attributes ) : ObjectHandle

Copies an object, creating a new object for the copy

CreateObject ( List attributes ) : ObjectHandle

Creates a new object

Decrypt ( Mechanism mechanism, ObjectHandle keyHandle, byte encryptedData ) : byte[]

Decrypts single-part data

Decrypt ( Mechanism mechanism, ObjectHandle keyHandle, Stream inputStream, Stream outputStream ) : void

Decrypts multi-part data

Decrypt ( Mechanism mechanism, ObjectHandle keyHandle, Stream inputStream, Stream outputStream, int bufferLength ) : void

Decrypts multi-part data

DecryptDigest ( Mechanism digestingMechanism, Mechanism decryptionMechanism, ObjectHandle keyHandle, Stream inputStream, Stream outputStream ) : byte[]

Digests and decrypts data

DecryptDigest ( Mechanism digestingMechanism, Mechanism decryptionMechanism, ObjectHandle keyHandle, Stream inputStream, Stream outputStream, int bufferLength ) : byte[]

Digests and decrypts data

DecryptDigest ( Mechanism digestingMechanism, Mechanism decryptionMechanism, ObjectHandle keyHandle, byte data, byte &digest, byte &decryptedData ) : void

Digests and decrypts data

DecryptVerify ( Mechanism verificationMechanism, ObjectHandle verificationKeyHandle, Mechanism decryptionMechanism, ObjectHandle decryptionKeyHandle, Stream inputStream, Stream outputStream, byte signature, bool &isValid ) : void

Decrypts data and verifies a signature of data

DecryptVerify ( Mechanism verificationMechanism, ObjectHandle verificationKeyHandle, Mechanism decryptionMechanism, ObjectHandle decryptionKeyHandle, Stream inputStream, Stream outputStream, byte signature, bool &isValid, int bufferLength ) : void

Decrypts data and verifies a signature of data

DecryptVerify ( Mechanism verificationMechanism, ObjectHandle verificationKeyHandle, Mechanism decryptionMechanism, ObjectHandle decryptionKeyHandle, byte data, byte signature, byte &decryptedData, bool &isValid ) : void

Decrypts data and verifies a signature of data

DeriveKey ( Mechanism mechanism, ObjectHandle baseKeyHandle, List attributes ) : ObjectHandle

Derives a key from a base key, creating a new key object

DestroyObject ( ObjectHandle objectHandle ) : void

Destroys an object

Digest ( Mechanism mechanism, Stream inputStream ) : byte[]

Digests multi-part data

Digest ( Mechanism mechanism, Stream inputStream, int bufferLength ) : byte[]

Digests multi-part data

Digest ( Mechanism mechanism, byte data ) : byte[]

Digests single-part data

DigestEncrypt ( Mechanism digestingMechanism, Mechanism encryptionMechanism, ObjectHandle keyHandle, Stream inputStream, Stream outputStream ) : byte[]

Digests and encrypts data

DigestEncrypt ( Mechanism digestingMechanism, Mechanism encryptionMechanism, ObjectHandle keyHandle, Stream inputStream, Stream outputStream, int bufferLength ) : byte[]

Digests and encrypts data

DigestEncrypt ( Mechanism digestingMechanism, Mechanism encryptionMechanism, ObjectHandle keyHandle, byte data, byte &digest, byte &encryptedData ) : void

Digests and encrypts data

DigestKey ( Mechanism mechanism, ObjectHandle keyHandle ) : byte[]

Digests the value of a secret key

Dispose ( ) : void

Disposes object

Encrypt ( Mechanism mechanism, ObjectHandle keyHandle, byte data ) : byte[]

Encrypts single-part data

Encrypt ( Mechanism mechanism, ObjectHandle keyHandle, Stream inputStream, Stream outputStream ) : void

Encrypts multi-part data

Encrypt ( Mechanism mechanism, ObjectHandle keyHandle, Stream inputStream, Stream outputStream, int bufferLength ) : void

Encrypts multi-part data

FindAllObjects ( List attributes ) : List

Searches for all token and session objects that match provided attributes

FindObjects ( int objectCount ) : List

Continues a search for token and session objects that match a template, obtaining additional object handles

FindObjectsFinal ( ) : void

Terminates a search for token and session objects

FindObjectsInit ( List attributes ) : void

Initializes a search for token and session objects that match a attributes

GenerateKey ( Mechanism mechanism, List attributes ) : ObjectHandle

Generates a secret key or set of domain parameters, creating a new object

GenerateKeyPair ( Mechanism mechanism, List publicKeyAttributes, List privateKeyAttributes, ObjectHandle &publicKeyHandle, ObjectHandle &privateKeyHandle ) : void

Generates a public/private key pair, creating new key objects

GenerateRandom ( int length ) : byte[]

Generates random or pseudo-random data

GetAttributeValue ( ObjectHandle objectHandle, List attributes ) : List

Obtains the value of one or more attributes of an object

GetAttributeValue ( ObjectHandle objectHandle, List attributes ) : List

Obtains the value of one or more attributes of an object

GetFunctionStatus ( ) : void

Legacy function which should throw CKR_FUNCTION_NOT_PARALLEL

GetObjectSize ( ObjectHandle objectHandle ) : uint

Gets the size of an object in bytes.

GetOperationState ( ) : byte[]

Obtains a copy of the cryptographic operations state of a session encoded as an array of bytes

GetSessionInfo ( ) : SessionInfo

Obtains information about a session

InitPin ( byte userPin ) : void

Initializes the normal user's PIN

InitPin ( string userPin ) : void

Initializes the normal user's PIN

Login ( CKU userType, byte pin ) : void

Logs a user into a token

Login ( CKU userType, string pin ) : void

Logs a user into a token

Logout ( ) : void

Logs a user out from a token

SeedRandom ( byte seed ) : void

Mixes additional seed material into the token's random number generator

SetAttributeValue ( ObjectHandle objectHandle, List attributes ) : void

Modifies the value of one or more attributes of an object

SetOperationState ( byte state, ObjectHandle encryptionKey, ObjectHandle authenticationKey ) : void

Restores the cryptographic operations state of a session from an array of bytes obtained with GetOperationState

SetPin ( byte oldPin, byte newPin ) : void

Modifies the PIN of the user that is currently logged in, or the CKU_USER PIN if the session is not logged in.

SetPin ( string oldPin, string newPin ) : void

Modifies the PIN of the user that is currently logged in, or the CKU_USER PIN if the session is not logged in.

Sign ( Mechanism mechanism, ObjectHandle keyHandle, Stream inputStream ) : byte[]

Signs multi-part data, where the signature is an appendix to the data

Sign ( Mechanism mechanism, ObjectHandle keyHandle, Stream inputStream, int bufferLength ) : byte[]

Signs multi-part data, where the signature is an appendix to the data

Sign ( Mechanism mechanism, ObjectHandle keyHandle, byte data ) : byte[]

Signs single-part data, where the signature is an appendix to the data

SignEncrypt ( Mechanism signingMechanism, ObjectHandle signingKeyHandle, Mechanism encryptionMechanism, ObjectHandle encryptionKeyHandle, Stream inputStream, Stream outputStream ) : byte[]

Signs and encrypts data

SignEncrypt ( Mechanism signingMechanism, ObjectHandle signingKeyHandle, Mechanism encryptionMechanism, ObjectHandle encryptionKeyHandle, Stream inputStream, Stream outputStream, int bufferLength ) : byte[]

Signs and encrypts data

SignEncrypt ( Mechanism signingMechanism, ObjectHandle signingKeyHandle, Mechanism encryptionMechanism, ObjectHandle encryptionKeyHandle, byte data, byte &signature, byte &encryptedData ) : void

Signs and encrypts data

SignRecover ( Mechanism mechanism, ObjectHandle keyHandle, byte data ) : byte[]

Signs single-part data, where the data can be recovered from the signature

UnwrapKey ( Mechanism mechanism, ObjectHandle unwrappingKeyHandle, byte wrappedKey, List attributes ) : ObjectHandle

Unwraps (i.e. decrypts) a wrapped key, creating a new private key or secret key object

Verify ( Mechanism mechanism, ObjectHandle keyHandle, Stream inputStream, byte signature, bool &isValid ) : void

Verifies a signature of data, where the signature is an appendix to the data

Verify ( Mechanism mechanism, ObjectHandle keyHandle, Stream inputStream, byte signature, bool &isValid, int bufferLength ) : void

Verifies a signature of data, where the signature is an appendix to the data

Verify ( Mechanism mechanism, ObjectHandle keyHandle, byte data, byte signature, bool &isValid ) : void

Verifies a signature of data, where the signature is an appendix to the data

VerifyRecover ( Mechanism mechanism, ObjectHandle keyHandle, byte signature, bool &isValid ) : byte[]

Verifies signature of data, where the data can be recovered from the signature

WrapKey ( Mechanism mechanism, ObjectHandle wrappingKeyHandle, ObjectHandle keyHandle ) : byte[]

Wraps (i.e., encrypts) a private or secret key

Méthodes protégées

Méthode Description
Dispose ( bool disposing ) : void

Disposes object

Private Methods

Méthode Description
Session ( LowLevelAPI41 pkcs11, uint sessionId ) : System

Initializes new instance of Session class

Method Details

CancelFunction() public méthode

Legacy function which should throw CKR_FUNCTION_NOT_PARALLEL
public CancelFunction ( ) : void
Résultat void

CloseSession() public méthode

Closes a session between an application and a token
public CloseSession ( ) : void
Résultat void

CopyObject() public méthode

Copies an object, creating a new object for the copy
public CopyObject ( ObjectHandle objectHandle, List attributes ) : ObjectHandle
objectHandle ObjectHandle Handle of object to be copied
attributes List New values for any attributes of the object that can ordinarily be modified
Résultat ObjectHandle

CreateObject() public méthode

Creates a new object
public CreateObject ( List attributes ) : ObjectHandle
attributes List Object attributes
Résultat ObjectHandle

Decrypt() public méthode

Decrypts single-part data
public Decrypt ( Mechanism mechanism, ObjectHandle keyHandle, byte encryptedData ) : byte[]
mechanism Mechanism Decryption mechanism
keyHandle ObjectHandle Handle of the decryption key
encryptedData byte Data to be decrypted
Résultat byte[]

Decrypt() public méthode

Decrypts multi-part data
public Decrypt ( Mechanism mechanism, ObjectHandle keyHandle, Stream inputStream, Stream outputStream ) : void
mechanism Mechanism Decryption mechanism
keyHandle ObjectHandle Handle of the decryption key
inputStream Stream Input stream from which encrypted data should be read
outputStream Stream Output stream where decrypted data should be written
Résultat void

Decrypt() public méthode

Decrypts multi-part data
public Decrypt ( Mechanism mechanism, ObjectHandle keyHandle, Stream inputStream, Stream outputStream, int bufferLength ) : void
mechanism Mechanism Decryption mechanism
keyHandle ObjectHandle Handle of the decryption key
inputStream Stream Input stream from which encrypted data should be read
outputStream Stream Output stream where decrypted data should be written
bufferLength int Size of read buffer in bytes
Résultat void

DecryptDigest() public méthode

Digests and decrypts data
public DecryptDigest ( Mechanism digestingMechanism, Mechanism decryptionMechanism, ObjectHandle keyHandle, Stream inputStream, Stream outputStream ) : byte[]
digestingMechanism Mechanism Digesting mechanism
decryptionMechanism Mechanism Decryption mechanism
keyHandle ObjectHandle Handle of the decryption key
inputStream Stream Input stream from which data to be processed should be read
outputStream Stream Output stream where decrypted data should be written
Résultat byte[]

DecryptDigest() public méthode

Digests and decrypts data
public DecryptDigest ( Mechanism digestingMechanism, Mechanism decryptionMechanism, ObjectHandle keyHandle, Stream inputStream, Stream outputStream, int bufferLength ) : byte[]
digestingMechanism Mechanism Digesting mechanism
decryptionMechanism Mechanism Decryption mechanism
keyHandle ObjectHandle Handle of the decryption key
inputStream Stream Input stream from which data to be processed should be read
outputStream Stream Output stream where decrypted data should be written
bufferLength int Size of read buffer in bytes
Résultat byte[]

DecryptDigest() public méthode

Digests and decrypts data
public DecryptDigest ( Mechanism digestingMechanism, Mechanism decryptionMechanism, ObjectHandle keyHandle, byte data, byte &digest, byte &decryptedData ) : void
digestingMechanism Mechanism Digesting mechanism
decryptionMechanism Mechanism Decryption mechanism
keyHandle ObjectHandle Handle of the decryption key
data byte Data to be processed
digest byte Digest
decryptedData byte Decrypted data
Résultat void

DecryptVerify() public méthode

Decrypts data and verifies a signature of data
public DecryptVerify ( Mechanism verificationMechanism, ObjectHandle verificationKeyHandle, Mechanism decryptionMechanism, ObjectHandle decryptionKeyHandle, Stream inputStream, Stream outputStream, byte signature, bool &isValid ) : void
verificationMechanism Mechanism Verification mechanism
verificationKeyHandle ObjectHandle Handle of the verification key
decryptionMechanism Mechanism Decryption mechanism
decryptionKeyHandle ObjectHandle Handle of the decryption key
inputStream Stream Input stream from which data to be processed should be read
outputStream Stream Output stream where decrypted data should be written
signature byte Signature
isValid bool Flag indicating whether signature is valid
Résultat void

DecryptVerify() public méthode

Decrypts data and verifies a signature of data
public DecryptVerify ( Mechanism verificationMechanism, ObjectHandle verificationKeyHandle, Mechanism decryptionMechanism, ObjectHandle decryptionKeyHandle, Stream inputStream, Stream outputStream, byte signature, bool &isValid, int bufferLength ) : void
verificationMechanism Mechanism Verification mechanism
verificationKeyHandle ObjectHandle Handle of the verification key
decryptionMechanism Mechanism Decryption mechanism
decryptionKeyHandle ObjectHandle Handle of the decryption key
inputStream Stream Input stream from which data to be processed should be read
outputStream Stream Output stream where decrypted data should be written
signature byte Signature
isValid bool Flag indicating whether signature is valid
bufferLength int Size of read buffer in bytes
Résultat void

DecryptVerify() public méthode

Decrypts data and verifies a signature of data
public DecryptVerify ( Mechanism verificationMechanism, ObjectHandle verificationKeyHandle, Mechanism decryptionMechanism, ObjectHandle decryptionKeyHandle, byte data, byte signature, byte &decryptedData, bool &isValid ) : void
verificationMechanism Mechanism Verification mechanism
verificationKeyHandle ObjectHandle Handle of the verification key
decryptionMechanism Mechanism Decryption mechanism
decryptionKeyHandle ObjectHandle Handle of the decryption key
data byte Data to be processed
signature byte Signature
decryptedData byte Decrypted data
isValid bool Flag indicating whether signature is valid
Résultat void

DeriveKey() public méthode

Derives a key from a base key, creating a new key object
public DeriveKey ( Mechanism mechanism, ObjectHandle baseKeyHandle, List attributes ) : ObjectHandle
mechanism Mechanism Derivation mechanism
baseKeyHandle ObjectHandle Handle of base key
attributes List Attributes for the new key
Résultat ObjectHandle

DestroyObject() public méthode

Destroys an object
public DestroyObject ( ObjectHandle objectHandle ) : void
objectHandle ObjectHandle Handle of object to be destroyed
Résultat void

Digest() public méthode

Digests multi-part data
public Digest ( Mechanism mechanism, Stream inputStream ) : byte[]
mechanism Mechanism Digesting mechanism
inputStream Stream Input stream from which data should be read
Résultat byte[]

Digest() public méthode

Digests multi-part data
public Digest ( Mechanism mechanism, Stream inputStream, int bufferLength ) : byte[]
mechanism Mechanism Digesting mechanism
inputStream Stream Input stream from which data should be read
bufferLength int Size of read buffer in bytes
Résultat byte[]

Digest() public méthode

Digests single-part data
public Digest ( Mechanism mechanism, byte data ) : byte[]
mechanism Mechanism Digesting mechanism
data byte Data to be digested
Résultat byte[]

DigestEncrypt() public méthode

Digests and encrypts data
public DigestEncrypt ( Mechanism digestingMechanism, Mechanism encryptionMechanism, ObjectHandle keyHandle, Stream inputStream, Stream outputStream ) : byte[]
digestingMechanism Mechanism Digesting mechanism
encryptionMechanism Mechanism Encryption mechanism
keyHandle 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
Résultat byte[]

DigestEncrypt() public méthode

Digests and encrypts data
public DigestEncrypt ( Mechanism digestingMechanism, Mechanism encryptionMechanism, ObjectHandle keyHandle, Stream inputStream, Stream outputStream, int bufferLength ) : byte[]
digestingMechanism Mechanism Digesting mechanism
encryptionMechanism Mechanism Encryption mechanism
keyHandle 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
bufferLength int Size of read buffer in bytes
Résultat byte[]

DigestEncrypt() public méthode

Digests and encrypts data
public DigestEncrypt ( Mechanism digestingMechanism, Mechanism encryptionMechanism, ObjectHandle keyHandle, byte data, byte &digest, byte &encryptedData ) : void
digestingMechanism Mechanism Digesting mechanism
encryptionMechanism Mechanism Encryption mechanism
keyHandle ObjectHandle Handle of the encryption key
data byte Data to be processed
digest byte Digest
encryptedData byte Encrypted data
Résultat void

DigestKey() public méthode

Digests the value of a secret key
public DigestKey ( Mechanism mechanism, ObjectHandle keyHandle ) : byte[]
mechanism Mechanism Digesting mechanism
keyHandle ObjectHandle Handle of the secret key to be digested
Résultat byte[]

Dispose() public méthode

Disposes object
public Dispose ( ) : void
Résultat void

Dispose() protected méthode

Disposes object
protected Dispose ( bool disposing ) : void
disposing bool Flag indicating whether managed resources should be disposed
Résultat void

Encrypt() public méthode

Encrypts single-part data
public Encrypt ( Mechanism mechanism, ObjectHandle keyHandle, byte data ) : byte[]
mechanism Mechanism Encryption mechanism
keyHandle ObjectHandle Handle of the encryption key
data byte Data to be encrypted
Résultat byte[]

Encrypt() public méthode

Encrypts multi-part data
public Encrypt ( Mechanism mechanism, ObjectHandle keyHandle, Stream inputStream, Stream outputStream ) : void
mechanism Mechanism Encryption mechanism
keyHandle ObjectHandle Handle of the encryption key
inputStream Stream Input stream from which data to be encrypted should be read
outputStream Stream Output stream where encrypted data should be written
Résultat void

Encrypt() public méthode

Encrypts multi-part data
public Encrypt ( Mechanism mechanism, ObjectHandle keyHandle, Stream inputStream, Stream outputStream, int bufferLength ) : void
mechanism Mechanism Encryption mechanism
keyHandle ObjectHandle Handle of the encryption key
inputStream Stream Input stream from which data to be encrypted should be read
outputStream Stream Output stream where encrypted data should be written
bufferLength int Size of read buffer in bytes
Résultat void

FindAllObjects() public méthode

Searches for all token and session objects that match provided attributes
public FindAllObjects ( List attributes ) : List
attributes List Attributes that should be matched
Résultat List

FindObjects() public méthode

Continues a search for token and session objects that match a template, obtaining additional object handles
public FindObjects ( int objectCount ) : List
objectCount int Maximum number of object handles to be returned
Résultat List

FindObjectsFinal() public méthode

Terminates a search for token and session objects
public FindObjectsFinal ( ) : void
Résultat void

FindObjectsInit() public méthode

Initializes a search for token and session objects that match a attributes
public FindObjectsInit ( List attributes ) : void
attributes List Attributes that should be matched
Résultat void

GenerateKey() public méthode

Generates a secret key or set of domain parameters, creating a new object
public GenerateKey ( Mechanism mechanism, List attributes ) : ObjectHandle
mechanism Mechanism Generation mechanism
attributes List Attributes of the new key or set of domain parameters
Résultat ObjectHandle

GenerateKeyPair() public méthode

Generates a public/private key pair, creating new key objects
public GenerateKeyPair ( Mechanism mechanism, List publicKeyAttributes, List privateKeyAttributes, ObjectHandle &publicKeyHandle, ObjectHandle &privateKeyHandle ) : void
mechanism Mechanism Key generation mechanism
publicKeyAttributes List Attributes of the public key
privateKeyAttributes List Attributes of the private key
publicKeyHandle ObjectHandle Handle of the new public key
privateKeyHandle ObjectHandle Handle of the new private key
Résultat void

GenerateRandom() public méthode

Generates random or pseudo-random data
public GenerateRandom ( int length ) : byte[]
length int Length in bytes of the random or pseudo-random data to be generated
Résultat byte[]

GetAttributeValue() public méthode

Obtains the value of one or more attributes of an object
public GetAttributeValue ( ObjectHandle objectHandle, List attributes ) : List
objectHandle ObjectHandle Handle of object whose attributes should be read
attributes List List of attributes that should be read
Résultat List

GetAttributeValue() public méthode

Obtains the value of one or more attributes of an object
public GetAttributeValue ( ObjectHandle objectHandle, List attributes ) : List
objectHandle ObjectHandle Handle of object whose attributes should be read
attributes List List of attributes that should be read
Résultat List

GetFunctionStatus() public méthode

Legacy function which should throw CKR_FUNCTION_NOT_PARALLEL
public GetFunctionStatus ( ) : void
Résultat void

GetObjectSize() public méthode

Gets the size of an object in bytes.
public GetObjectSize ( ObjectHandle objectHandle ) : uint
objectHandle ObjectHandle Handle of object
Résultat uint

GetOperationState() public méthode

Obtains a copy of the cryptographic operations state of a session encoded as an array of bytes
public GetOperationState ( ) : byte[]
Résultat byte[]

GetSessionInfo() public méthode

Obtains information about a session
public GetSessionInfo ( ) : SessionInfo
Résultat SessionInfo

InitPin() public méthode

Initializes the normal user's PIN
public InitPin ( byte userPin ) : void
userPin byte Pin value
Résultat void

InitPin() public méthode

Initializes the normal user's PIN
public InitPin ( string userPin ) : void
userPin string Pin value
Résultat void

Login() public méthode

Logs a user into a token
public Login ( CKU userType, byte pin ) : void
userType CKU Type of user
pin byte Pin of user
Résultat void

Login() public méthode

Logs a user into a token
public Login ( CKU userType, string pin ) : void
userType CKU Type of user
pin string Pin of user
Résultat void

Logout() public méthode

Logs a user out from a token
public Logout ( ) : void
Résultat void

SeedRandom() public méthode

Mixes additional seed material into the token's random number generator
public SeedRandom ( byte seed ) : void
seed byte Seed material
Résultat void

SetAttributeValue() public méthode

Modifies the value of one or more attributes of an object
public SetAttributeValue ( ObjectHandle objectHandle, List attributes ) : void
objectHandle ObjectHandle Handle of object whose attributes should be modified
attributes List List of attributes that should be modified
Résultat void

SetOperationState() public méthode

Restores the cryptographic operations state of a session from an array of bytes obtained with GetOperationState
public SetOperationState ( byte state, ObjectHandle encryptionKey, ObjectHandle authenticationKey ) : void
state byte Array of bytes obtained with GetOperationState
encryptionKey ObjectHandle CK_INVALID_HANDLE or handle to the key which will be used for an ongoing encryption or decryption operation in the restored session
authenticationKey ObjectHandle CK_INVALID_HANDLE or handle to the key which will be used for an ongoing signature, MACing, or verification operation in the restored session
Résultat void

SetPin() public méthode

Modifies the PIN of the user that is currently logged in, or the CKU_USER PIN if the session is not logged in.
public SetPin ( byte oldPin, byte newPin ) : void
oldPin byte Old PIN value
newPin byte New PIN value
Résultat void

SetPin() public méthode

Modifies the PIN of the user that is currently logged in, or the CKU_USER PIN if the session is not logged in.
public SetPin ( string oldPin, string newPin ) : void
oldPin string Old PIN value
newPin string New PIN value
Résultat void

Sign() public méthode

Signs multi-part data, where the signature is an appendix to the data
public Sign ( Mechanism mechanism, ObjectHandle keyHandle, Stream inputStream ) : byte[]
mechanism Mechanism Signature mechanism
keyHandle ObjectHandle Signature key
inputStream Stream Input stream from which data should be read
Résultat byte[]

Sign() public méthode

Signs multi-part data, where the signature is an appendix to the data
public Sign ( Mechanism mechanism, ObjectHandle keyHandle, Stream inputStream, int bufferLength ) : byte[]
mechanism Mechanism Signature mechanism
keyHandle ObjectHandle Signature key
inputStream Stream Input stream from which data should be read
bufferLength int Size of read buffer in bytes
Résultat byte[]

Sign() public méthode

Signs single-part data, where the signature is an appendix to the data
public Sign ( Mechanism mechanism, ObjectHandle keyHandle, byte data ) : byte[]
mechanism Mechanism Signature mechanism
keyHandle ObjectHandle Signature key
data byte Data to be signed
Résultat byte[]

SignEncrypt() public méthode

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
Résultat byte[]

SignEncrypt() public méthode

Signs and encrypts data
public SignEncrypt ( Mechanism signingMechanism, ObjectHandle signingKeyHandle, Mechanism encryptionMechanism, ObjectHandle encryptionKeyHandle, Stream inputStream, Stream outputStream, int bufferLength ) : 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
bufferLength int Size of read buffer in bytes
Résultat byte[]

SignEncrypt() public méthode

Signs and encrypts data
public SignEncrypt ( Mechanism signingMechanism, ObjectHandle signingKeyHandle, Mechanism encryptionMechanism, ObjectHandle encryptionKeyHandle, byte data, byte &signature, byte &encryptedData ) : void
signingMechanism Mechanism Signing mechanism
signingKeyHandle ObjectHandle Handle of the signing key
encryptionMechanism Mechanism Encryption mechanism
encryptionKeyHandle ObjectHandle Handle of the encryption key
data byte Data to be processed
signature byte Signature
encryptedData byte Encrypted data
Résultat void

SignRecover() public méthode

Signs single-part data, where the data can be recovered from the signature
public SignRecover ( Mechanism mechanism, ObjectHandle keyHandle, byte data ) : byte[]
mechanism Mechanism Signature mechanism
keyHandle ObjectHandle Signature key
data byte Data to be signed
Résultat byte[]

UnwrapKey() public méthode

Unwraps (i.e. decrypts) a wrapped key, creating a new private key or secret key object
public UnwrapKey ( Mechanism mechanism, ObjectHandle unwrappingKeyHandle, byte wrappedKey, List attributes ) : ObjectHandle
mechanism Mechanism Unwrapping mechanism
unwrappingKeyHandle ObjectHandle Handle of unwrapping key
wrappedKey byte Wrapped key
attributes List Attributes for unwrapped key
Résultat ObjectHandle

Verify() public méthode

Verifies a signature of data, where the signature is an appendix to the data
public Verify ( Mechanism mechanism, ObjectHandle keyHandle, Stream inputStream, byte signature, bool &isValid ) : void
mechanism Mechanism Verification mechanism;
keyHandle ObjectHandle Verification key
inputStream Stream Input stream from which data that was signed should be read
signature byte Signature
isValid bool Flag indicating whether signature is valid
Résultat void

Verify() public méthode

Verifies a signature of data, where the signature is an appendix to the data
public Verify ( Mechanism mechanism, ObjectHandle keyHandle, Stream inputStream, byte signature, bool &isValid, int bufferLength ) : void
mechanism Mechanism Verification mechanism;
keyHandle ObjectHandle Verification key
inputStream Stream Input stream from which data that was signed should be read
signature byte Signature
isValid bool Flag indicating whether signature is valid
bufferLength int Size of read buffer in bytes
Résultat void

Verify() public méthode

Verifies a signature of data, where the signature is an appendix to the data
public Verify ( Mechanism mechanism, ObjectHandle keyHandle, byte data, byte signature, bool &isValid ) : void
mechanism Mechanism Verification mechanism;
keyHandle ObjectHandle Verification key
data byte Data that was signed
signature byte Signature
isValid bool Flag indicating whether signature is valid
Résultat void

VerifyRecover() public méthode

Verifies signature of data, where the data can be recovered from the signature
public VerifyRecover ( Mechanism mechanism, ObjectHandle keyHandle, byte signature, bool &isValid ) : byte[]
mechanism Mechanism Verification mechanism;
keyHandle ObjectHandle Verification key
signature byte Signature
isValid bool Flag indicating whether signature is valid
Résultat byte[]

WrapKey() public méthode

Wraps (i.e., encrypts) a private or secret key
public WrapKey ( Mechanism mechanism, ObjectHandle wrappingKeyHandle, ObjectHandle keyHandle ) : byte[]
mechanism Mechanism Wrapping mechanism
wrappingKeyHandle ObjectHandle Handle of wrapping key
keyHandle ObjectHandle Handle of key to be wrapped
Résultat byte[]