bali.notary.NotaryKey Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of java-bali-digital-notary Show documentation
Show all versions of java-bali-digital-notary Show documentation
This project defines the Java interfaces and classes for a digital notary.
/************************************************************************
* Copyright (c) Crater Dog Technologies(TM). All Rights Reserved. *
************************************************************************
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. *
* *
* This code is free software; you can redistribute it and/or modify it *
* under the terms of The MIT License (MIT), as published by the Open *
* Source Initiative. (See http://opensource.org/licenses/MIT) *
************************************************************************/
package bali.notary;
import bali.language.BaliComponent;
import bali.notary.handlers.PrivateKeyHandler;
import bali.notary.handlers.PublicKeyHandler;
import java.security.PrivateKey;
import java.security.PublicKey;
/**
* This class defines the attributes associated with a notary key. A notary key has a private
* part (signing key) that is used to sign notarized documents. It also has a public part
* (verification key) that is used to verify that a document was signed using the notary key.
*
* @author Derk Norton
*/
public final class NotaryKey extends BaliComponent {
/**
* A citation of the notary certificate below.
*/
public Citation certificateCitation;
/**
* The public certificate that is used to verify the signature on a notarized document.
*/
public Notarized notaryCertificate;
/**
* The private key that is used for signing a notarized document.
*/
public PrivateKey privateKey;
/**
* An encrypted PEM encoding of the private key. The pass phrase is required to
* decrypt this encoding into the actual private key.
*/
public String encodedKey;
/**
* This default constructor adds in specialized serialization handlers.
*/
public NotaryKey() {
addHandler(PrivateKey.class, new PrivateKeyHandler());
addHandler(PublicKey.class, new PublicKeyHandler());
}
}