All Downloads are FREE. Search and download functionalities are using the official Maven repository.

bali.notary.Certificate Maven / Gradle / Ivy

There is a newer version: 3.6
Show newest version
/************************************************************************
 * 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.notary.handlers.PublicKeyHandler;
import craterdog.primitives.BinaryString;
import java.security.PublicKey;


/**
 * This class defines the attributes that make up the public notary certificate
 * for a Bali account.
 *
 * @author Derk Norton
 */
public final class Certificate extends Document {

    /**
     * The signing algorithm used with this certificate.
     */
    public String signingAlgorithm;

    /**
     * The encryption algorithm used with this certificate.
     */
    public String encryptionAlgorithm;

    /**
     * The public key that is used for verifying a digital signature or encrypting a secret key.
     */
    public PublicKey publicKey;

    /**
     * The private slice that can be used to recover the private key if lost. Note, there is
     * no information about the private key stored in the private slice.
     */
    public BinaryString privateSlice;

    /**
     * This default constructor adds in specialized serialization handlers.
     */
    public Certificate() {
        addHandler(PublicKey.class, new PublicKeyHandler());
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy