Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // ErrInvalidProof is returned by Verifier.VerifyProof when the given proof is // invalid. ErrInvalidProof = errors.New("data integrity proof invalid") // ErrProofTransformation is returned by Signer.CreateProof and // Verifier.VerifyProof when proof transformation fails. ErrProofTransformation = errors.New("error in data integrity proof transformation") )
Functions ¶
This section is empty.
Types ¶
type RequiresCreated ¶
type RequiresCreated interface {
RequiresCreated() bool
}
RequiresCreated specifies that a data integrity suite implementation, must provide a method that tells the caller whether this suite requires the proof.Created field to exist.
type Signer ¶
type Signer interface { // CreateProof performs data integrity proof creation steps: transform, hash, // and proof generation, using this implementation's cryptographic suite. CreateProof(doc []byte, opts *models.ProofOptions) (*models.Proof, error) RequiresCreated }
Signer is an implementation of a data integrity cryptographic suite that provides the transform, hash, and proof generation steps of the data integrity Add Proof algorithm.
type SignerInitializer ¶
SignerInitializer initializes a Signer, using initialization options that were passed into the SignerInitializer's creation.
type Suite ¶
Suite implements a data integrity cryptographic suite for both proof creation and proof verification.
type Type ¶
type Type interface {
Type() []string
}
Type provides a method that returns the cryptographic suite type of the corresponding suite. Each suite has a type constant that's defined in its associated specification.
type Verifier ¶
type Verifier interface { // VerifyProof performs data integrity proof verification steps: transform, // hash, and proof verification, using this implementation's cryptographic // suite. VerifyProof(doc []byte, proof *models.Proof, opts *models.ProofOptions) error RequiresCreated }
Verifier is an implementation of a data integrity cryptographic suite that provides the transform, hash, and proof verification steps of the data integrity verify Proof algorithm.
type VerifierInitializer ¶
VerifierInitializer initializes a Verifier, using initialization options that were passed into the VerifierInitializer's creation.