Package net.handle.hdllib.trust
Class JsonWebSignatureImpl
- java.lang.Object
-
- net.handle.hdllib.trust.JsonWebSignatureImpl
-
- All Implemented Interfaces:
JsonWebSignature
public class JsonWebSignatureImpl extends java.lang.Object implements JsonWebSignature
-
-
Constructor Summary
Constructors Constructor Description JsonWebSignatureImpl(byte[] payload, java.security.PrivateKey privateKey)
JsonWebSignatureImpl(java.lang.String serialization)
JsonWebSignatureImpl(java.lang.String payload, java.security.PrivateKey privateKey)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]
getPayloadAsBytes()
java.lang.String
getPayloadAsString()
java.lang.String
serialize()
java.lang.String
serializeToJson()
boolean
validates(java.security.PublicKey publicKey)
-
-
-
Constructor Detail
-
JsonWebSignatureImpl
public JsonWebSignatureImpl(java.lang.String payload, java.security.PrivateKey privateKey) throws TrustException
- Throws:
TrustException
-
JsonWebSignatureImpl
public JsonWebSignatureImpl(byte[] payload, java.security.PrivateKey privateKey) throws TrustException
- Throws:
TrustException
-
JsonWebSignatureImpl
public JsonWebSignatureImpl(java.lang.String serialization) throws TrustException
- Throws:
TrustException
-
-
Method Detail
-
getPayloadAsString
public java.lang.String getPayloadAsString()
- Specified by:
getPayloadAsString
in interfaceJsonWebSignature
-
getPayloadAsBytes
public byte[] getPayloadAsBytes()
- Specified by:
getPayloadAsBytes
in interfaceJsonWebSignature
-
validates
public boolean validates(java.security.PublicKey publicKey) throws TrustException
- Specified by:
validates
in interfaceJsonWebSignature
- Throws:
TrustException
-
serialize
public java.lang.String serialize()
- Specified by:
serialize
in interfaceJsonWebSignature
-
serializeToJson
public java.lang.String serializeToJson()
- Specified by:
serializeToJson
in interfaceJsonWebSignature
-
-