Class: SigningIdentity


SigningIdentity is an extension of Identity to cover signing capabilities. E.g., signing identity should be requested in the case of a client who wishes to sign proposal responses and transactions

new SigningIdentity(certificate, publicKey, mspId, cryptoSuite, signer)

Name Type Description
certificate string HEX string for the PEM encoded certificate
publicKey module:api.Key The public key represented by the certificate
mspId string The associated MSP's ID that manages this identity
cryptoSuite module:api.CryptoSuite The underlying CryptoSuite implementation for the digital signature algorithm
signer Signer The signer object encapsulating the opaque private key and the corresponding digital signature algorithm to be used for signing operations


sign(msg, opts)

Signs digest with the private key contained inside the signer.
Name Type Description
msg Array.<byte> The message to sign
opts Object Options object for the signing, contains one field 'hashFunction' that allows different hashing algorithms to be used. If not present, will default to the hash function configured for the identity's own crypto suite object