Class X509SigningIdentity
- java.lang.Object
-
- org.hyperledger.fabric.sdk.identity.X509Identity
-
- org.hyperledger.fabric.sdk.identity.X509SigningIdentity
-
- All Implemented Interfaces:
Identity
,SigningIdentity
public class X509SigningIdentity extends X509Identity implements SigningIdentity
-
-
Field Summary
-
Fields inherited from class org.hyperledger.fabric.sdk.identity.X509Identity
user
-
-
Constructor Summary
Constructors Constructor Description X509SigningIdentity(CryptoSuite cryptoSuite, User user)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]
sign(byte[] msg)
Sings a message with the secret key and the corresponding certificateboolean
verifySignature(byte[] msg, byte[] sig)
Verifies a signature on a message-
Methods inherited from interface org.hyperledger.fabric.sdk.identity.Identity
createSerializedIdentity
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from class org.hyperledger.fabric.sdk.identity.X509Identity
createSerializedIdentity
-
-
-
-
Constructor Detail
-
X509SigningIdentity
public X509SigningIdentity(CryptoSuite cryptoSuite, User user)
-
-
Method Detail
-
sign
public byte[] sign(byte[] msg) throws CryptoException
Description copied from interface:SigningIdentity
Sings a message with the secret key and the corresponding certificate- Specified by:
sign
in interfaceSigningIdentity
- Returns:
- signature
- Throws:
CryptoException
-
verifySignature
public boolean verifySignature(byte[] msg, byte[] sig) throws CryptoException
Description copied from interface:SigningIdentity
Verifies a signature on a message- Specified by:
verifySignature
in interfaceSigningIdentity
- Returns:
- true/false
- Throws:
CryptoException
-
-