java.lang.Object
dev.netcode.security.identity.Signature
Signatures can be used to add prove to an Identity that the contained data
either comes from or was checked by a specific person, institution or service
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanChecks the validity of the signaturevoidsign(PrivateKey privateKey)Signs this Signature which makes it valid.toString()
-
Constructor Details
-
Signature
Creates a raw signature that is not signed yet.- Parameters:
issuerName- name of the issuerissuerIdentityID- unique identifier of the issuerdataHash- of the data to be signed
-
-
Method Details
-
isValid
Checks the validity of the signature- Parameters:
publicKey- of the instance that should have signed the dataidentity- the signature should belong to- Returns:
- true if the signature is valid and belongs to the given identity
-
sign
Signs this Signature which makes it valid.- Parameters:
privateKey- used to sign the signature
-
toString
-
getVerifiableDataString
- Returns:
- all the data contained in the signature that is verifiable
-