public interface Notarization
| Modifier and Type | Field and Description |
|---|---|
static int |
VALID_FOR_FOREVER
For a notary seal that never expires.
|
static int |
VALID_FOR_ONE_DAY
For a notary seal that expires after one day.
|
static int |
VALID_FOR_ONE_HOUR
For a notary seal that expires after one hour.
|
static int |
VALID_FOR_ONE_MINUTE
For a notary seal that expires after one minute.
|
static int |
VALID_FOR_ONE_MONTH
For a notary seal that expires after one month (30 days).
|
static int |
VALID_FOR_ONE_WEEK
For a notary seal that expires after one week.
|
static int |
VALID_FOR_ONE_YEAR
For a notary seal that expires after one year.
|
| Modifier and Type | Method and Description |
|---|---|
NotaryKey |
deserializeNotaryKey(String json,
char[] password)
This method de-serializes, from a JSON string, a notary key using the specified
password to decrypt the signing key.
|
boolean |
documentIsValid(craterdog.smart.SmartObject<? extends craterdog.smart.SmartObject<?>> document,
DigitalSeal seal,
PublicKey verificationKey)
This method uses the specified public verification key to verify that the specified
digital seal is valid for the specified document.
|
boolean |
documentIsValid(String document,
DigitalSeal seal,
PublicKey verificationKey)
This method uses the specified public verification key to verify that the specified
digital seal is valid for the specified document.
|
NotaryKey |
generateNotaryKey()
This method generates a new notary key consisting of an asymmetric (public/private) key pair
based on the algorithm implemented by the specific notary implementation.
|
Watermark |
generateWatermark(int secondsToLive)
This method generates a watermark defining the lifetime of a new document as well as
the version of the algorithm used to sign and verify the document.
|
DigitalSeal |
notarizeDocument(String documentType,
craterdog.smart.SmartObject<? extends craterdog.smart.SmartObject<?>> document,
NotaryKey notaryKey)
This method generates a digital seal from the specified document using the specified
private notary key.
|
DigitalSeal |
notarizeDocument(String documentType,
String document,
NotaryKey notaryKey)
This method generates a digital seal from the specified document using the specified
private notary key.
|
String |
serializeNotaryKey(NotaryKey notaryKey,
char[] password)
This method serializes, as a JSON string, the specified notary key encrypting the
private signing key using the specified password.
|
boolean |
watermarkIsValid(Watermark watermark)
This method checks to see if the watermark is still valid.
|
static final int VALID_FOR_ONE_MINUTE
static final int VALID_FOR_ONE_HOUR
static final int VALID_FOR_ONE_DAY
static final int VALID_FOR_ONE_WEEK
static final int VALID_FOR_ONE_MONTH
static final int VALID_FOR_ONE_YEAR
static final int VALID_FOR_FOREVER
NotaryKey generateNotaryKey()
String serializeNotaryKey(NotaryKey notaryKey, char[] password)
notaryKey - The notary key to be serialized.password - The password to be used to encrypt the signing key.NotaryKey deserializeNotaryKey(String json, char[] password) throws IOException
json - The JSON string representing the notary key.password - The password to be used to decrypt the signing key.IOExceptionWatermark generateWatermark(int secondsToLive)
secondsToLive - The number of seconds the document should be valid
from the current date and time.boolean watermarkIsValid(Watermark watermark)
watermark - The watermark to be validated.DigitalSeal notarizeDocument(String documentType, String document, NotaryKey notaryKey)
documentType - The type of document being notarized.document - The document to be notarized.notaryKey - The notary key used to notarize the document.boolean documentIsValid(String document, DigitalSeal seal, PublicKey verificationKey)
document - The notarized document to be verified.seal - The digital seal for the document.verificationKey - The verification key of the notary that signed the document.DigitalSeal notarizeDocument(String documentType, craterdog.smart.SmartObject<? extends craterdog.smart.SmartObject<?>> document, NotaryKey notaryKey)
documentType - The type of document being notarized.document - The document to be notarized.notaryKey - The notary key used to notarize the document.boolean documentIsValid(craterdog.smart.SmartObject<? extends craterdog.smart.SmartObject<?>> document,
DigitalSeal seal,
PublicKey verificationKey)
document - The notarized document to be verified.seal - The digital seal for the document.verificationKey - The verification key of the notary that signed the document.Copyright © 2015 Crater Dog Technologies(TM). All rights reserved.