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

craterdog.security.DigitalSeal Maven / Gradle / Ivy

There is a newer version: 3.12
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 craterdog.security;

import craterdog.primitives.Tag;
import craterdog.smart.SmartObject;

/**
 * This class defines the attributes that make up an digital seal that is used to sign
 * a document.
 *
 * @author Derk Norton
 */
public final class DigitalSeal extends SmartObject {

    /**
     * The actual attributes that make up the digital seal.
     */
    public SealAttributes attributes;

    /**
     * A base 32 encoding of the bytes that were generated as a signature of the seal attributes.
     * The signature must be generated using the following steps:
     * 
    *
  1. Format the attributes as a string.
  2. *
  3. Extract the characters of the string into a "UTF-8" based byte array.
  4. *
  5. Generate the signature bytes for that array using the algorithm specified in the Watermark of the signed document.
  6. *
  7. Encode the signature bytes as a base 32 string using the craterdog.utils.Base32Utils class.
  8. *
*/ public String notarySignature; /** * The default constructor ensures that the custom attribute types (like tags) will be * formatted correctly when printed. */ public DigitalSeal() { this.addSerializableClass(Tag.class); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy