ofd

package module
v0.0.0-...-ab26ade Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 12, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

README

ofd 文档

OFD(Open Fixed-layout Documents的简称,意为开放版式文件)版式文档是版面呈现效果高度精确固定的电子文件,其呈现与设备无关。与pdf文件相仿,具有格式独立、版面固定、固化呈现等特点。OFD也逐渐开始在电子发票、电子公文、电子证照等等的领域中应用。

ofd 特点

OFD标准有一系列技术优势。

  1. 体积精简,格式开放,利于理解,长期可读可用
  2. 根据我国各领域特色需要进行特性扩展,更深入地贴合了应用需求
  3. 标准可支持国产密码算法,是文档安全性的有力保证,也是文件具有法律效力的基本条件
  4. 标准是自主可控的,国家再有需要对OFD做上面提到的扩展时,特别是在我国党政军严肃类文档应用领域,可以不受控于外部的厂商,我们有自主的标准话语权

自定义签名验证器

通过实现 Validator 接口 ,初始化的时候加载验证器WithValidator

ofdReader, err :=NewOFDReader(testpath, WithValidator(XXValidator{}))
if err != nil {
	t.Logf("%s", err)
}
defer ofdReader.Close()

// 文本摘要 Digest([]byte) []byte

// 签名验证 Verify([]byte, []byte, []byte) (bool, error)

完整例子 以github.com/emmansun/gmsm 国密算法库为例

package ofd

import (
	"crypto/ecdsa"
	std "encoding/asn1"
	"math/big"

	"github.com/emmansun/gmsm/sm2"
	"github.com/emmansun/gmsm/sm3"
	"github.com/emmansun/gmsm/smx509"
)

type OtherValidator struct {
}


func (gm *OtherValidator) Digest(msg []byte) []byte {
	h := sm3.New()
	h.Write(msg)
	dataDash := h.Sum(nil)
	return dataDash

}
func (gm *OtherValidator) Verify(cert []byte, msg []byte, signature []byte) (bool, error) {
	certificate, err := smx509.ParseCertificate(cert)
	if err != nil {
		return false, err
	}
	pk := certificate.PublicKey.(*ecdsa.PublicKey)
	if len(signature) == 64 {
		r := new(big.Int).SetBytes(signature[0:32])
		s := new(big.Int).SetBytes(signature[32:64])

		result := sm2.VerifyWithSM2(pk, nil, msg, r, s)
		return result, nil
	} else {
		type Sign struct {
			R *big.Int
			S *big.Int
		}
		var sign Sign
		if _, err := std.Unmarshal(signature, &sign); err != nil {
			return false, err
		} else {
			ff, _ := new(big.Int).SetString(MAX, 16)
			if sign.R.Sign() == -1 {
				sign.R.And(sign.R, ff)
			}
			if sign.S.Sign() == -1 {
				sign.S.And(sign.S, ff)
			}
			result := sm2.VerifyWithSM2(pk, nil, msg, sign.R, sign.S)
			return result, nil
		}
	}
}

小通知

ofd-go项目发起有段时间,由于工作中涉及ofd的相关开发,我们团队曾经使用ofd-fw这个java库来完成我们的开发任务,使用过程中发现不少问题,期间我们也fork该库,形成自己的分支,问题的根源在于尽管ofd标准是统一的,但是各家软件集成商对于标准的理解不太一样,特别是关键字段的赋值上差别很大,所以需要针对不同的ofd软件集成商做适配,才能实现通用,由于ofd-rw的解决方案足有优秀,我们决定开辟新天地,ofd-go正是在这个背景下产生的,依托于go语言优秀的跨平台能力,成熟的生态,可以高度定制,开发HTTP服务,SDK,动态链接库,都是不错的选择.

目前的ofd-go每天的独立clone在50左右,反映出在市面上有一定的需求,但是除了项目初期有热心人士关注,提出issue,提交一些bug,后续的clone者反馈问题较少,作为发起人,我意识到ofd-go本身还不完善,为了持续推进开源项目,本着"我为人人,人人为我"的精神,现阶段希望征集大家对于ofd-go的需求提案,无论是提交bug、提供ofd测试样本或者是提供产品思路,都希望广泛交流,为此我建了讨论组,感兴趣的可以加群

QQ:628529123 QQ群

Documentation

Index

Constants

View Source
const (
	SM3_OID        = "1.2.156.10197.1.401"
	SM3WITHSM2_OID = "1.2.156.10197.1.501"
	MAX            = "ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"
)
View Source
const (
	OFD_PATH = "OFD.xml"
)

Variables

This section is empty.

Functions

func LoadZipFileContent

func LoadZipFileContent(rc *zip.ReadCloser, path string) ([]byte, error)

Types

type Attachments

type Attachments struct {
	AttachmentsXml
	// contains filtered or unexported fields
}

func (*Attachments) GetFileContent

func (attachments *Attachments) GetFileContent(path string) ([]byte, error)

type AttachmentsXml

type AttachmentsXml struct {
	XMLName    xml.Name `xml:"Attachments"`
	Text       string   `xml:",chardata"`
	Ofd        string   `xml:"ofd,attr"`
	Attachment []struct {
		Text         string `xml:",chardata"`
		ID           string `xml:"ID,attr"`
		Name         string `xml:"Name,attr"`
		Format       string `xml:"Format,attr"`
		Size         string `xml:"Size,attr"`
		Visible      string `xml:"Visible,attr"`
		CreationDate string `xml:"CreationDate,attr"`
	} `xml:"Attachment"`
}

type Category

type Category int
const (
	SIGN Category = iota
	SEAL
)

type Cert

type Cert []byte

type CertDigestList

type CertDigestList struct {
	CertDigestObjs []CertDigestObj
}

type CertDigestObj

type CertDigestObj struct {
	Type  ObjType
	Value CertDigestValue
}

type CertDigestValue

type CertDigestValue []byte

type CertInfoList

type CertInfoList struct {
	Certs []Cert
}

type CommonData

type CommonData struct {
	CommonDataXml
	// contains filtered or unexported fields
}

func (*CommonData) GetDocumentRes

func (commonData *CommonData) GetDocumentRes() (*DocumentRes, error)

func (*CommonData) GetPublicRes

func (commonData *CommonData) GetPublicRes() (*PublicRes, error)

func (*CommonData) GetTemplatePage

func (commonData *CommonData) GetTemplatePage() (*Page, error)

type CommonDataResource

type CommonDataResource int
const (
	PUBLICRES CommonDataResource = iota

	DOCUMENTRES

	TEMPLATEPAGE
)

type CommonDataXml

type CommonDataXml struct {
	Text      string `xml:",chardata"`
	MaxUnitID struct {
		Text string `xml:",chardata"`
	} `xml:"MaxUnitID"`
	PageArea struct {
		Text        string `xml:",chardata"`
		PhysicalBox struct {
			Text string `xml:",chardata"`
		} `xml:"PhysicalBox"`
	} `xml:"PageArea"`
	PublicRes struct {
		Text string `xml:",chardata"`
	} `xml:"PublicRes"`
	DocumentRes struct {
		Text string `xml:",chardata"`
	} `xml:"DocumentRes"`
	TemplatePage struct {
		Text    string `xml:",chardata"`
		ID      string `xml:"ID,attr"`
		BaseLoc string `xml:"BaseLoc,attr"`
	} `xml:"TemplatePage"`
}

type CommonValidator

type CommonValidator struct {
}

func (*CommonValidator) Digest

func (common *CommonValidator) Digest(msg []byte) []byte

func (*CommonValidator) Verify

func (common *CommonValidator) Verify(cert []byte, msg []byte, signature []byte) (bool, error)

type ContentInfo

type ContentInfo struct {
	// contains filtered or unexported fields
}

func NewContentInfo

func NewContentInfo(input cryptobyte.String) (*ContentInfo, error)

func (*ContentInfo) GetContent

func (contentInfo *ContentInfo) GetContent() []byte

type CustomTags

type CustomTags struct {
	CustomTagsXml
	// contains filtered or unexported fields
}

func (*CustomTags) GetFileContent

func (attachments *CustomTags) GetFileContent(path string) ([]byte, error)

type CustomTagsXml

type CustomTagsXml struct {
	XMLName   xml.Name `xml:"CustomTags"`
	Text      string   `xml:",chardata"`
	Ofd       string   `xml:"ofd,attr"`
	CustomTag struct {
		Text    string `xml:",chardata"`
		TypeID  string `xml:"TypeID,attr"`
		FileLoc struct {
			Text string `xml:",chardata"`
		} `xml:"FileLoc"`
	} `xml:"CustomTag"`
}

type DocResource

type DocResource int
const (
	ATTACHMENTS DocResource = iota
	CUSTOMTAGS
)

type Document

type Document struct {
	DocumentXml
	// contains filtered or unexported fields
}

func (*Document) GetAttachments

func (doc *Document) GetAttachments() (*Attachments, error)

func (*Document) GetCommonData

func (doc *Document) GetCommonData() (*CommonData, error)

func (*Document) GetCustomTags

func (doc *Document) GetCustomTags() (*CustomTags, error)

func (*Document) GetFileContent

func (document *Document) GetFileContent(path string) ([]byte, error)

func (*Document) GetPages

func (doc *Document) GetPages() (*Pages, error)

type DocumentRes

type DocumentRes struct {
	DocumentResXml
	// contains filtered or unexported fields
}

func (*DocumentRes) GetFileContent

func (docRes *DocumentRes) GetFileContent(path string) ([]byte, error)

type DocumentResXml

type DocumentResXml struct {
	XMLName     xml.Name `xml:"Res"`
	Text        string   `xml:",chardata"`
	Ofd         string   `xml:"ofd,attr"`
	BaseLoc     string   `xml:"BaseLoc,attr"`
	MultiMedias struct {
		Text       string `xml:",chardata"`
		MultiMedia []struct {
			Text      string `xml:",chardata"`
			ID        string `xml:"ID,attr"`
			Type      string `xml:"Type,attr"`
			MediaFile struct {
				Text string `xml:",chardata"`
			} `xml:"MediaFile"`
		} `xml:"MultiMedia"`
	} `xml:"MultiMedias"`
}

type DocumentXml

type DocumentXml struct {
	XMLName     xml.Name   `xml:"Document"`
	Text        string     `xml:",chardata"`
	Ofd         string     `xml:"ofd,attr"`
	CommonData  CommonData `xml:"CommonData"`
	Pages       Pages      `xml:"Pages"`
	Attachments struct {
		Text string `xml:",chardata"`
	} `xml:"Attachments"`
	CustomTags struct {
		Text string `xml:",chardata"`
	} `xml:"CustomTags"`
}

type ExtensionDatas

type ExtensionDatas struct {
	ExtnId    std.ObjectIdentifier
	Critical  bool
	ExtnValue []byte
}

func New_ExtensionDatas

func New_ExtensionDatas(extDatas cryptobyte.String) (*ExtensionDatas, error)

type Hash

type Hash interface {
	Digest([]byte) []byte
}

type OFD

type OFD struct {
	XMLName xml.Name `xml:"OFD"`
	Text    string   `xml:",chardata"`
	Ofd     string   `xml:"ofd,attr"`
	Version string   `xml:"Version,attr"`
	DocBody []struct {
		Text    string `xml:",chardata"`
		DocInfo struct {
			Text  string `xml:",chardata"`
			DocID struct {
				Text string `xml:",chardata"`
			} `xml:"DocID"`
		} `xml:"DocInfo"`
		DocRoot struct {
			Text string `xml:",chardata"`
		} `xml:"DocRoot"`
		Signatures struct {
			Text string `xml:",chardata"`
		} `xml:"Signatures"`
	} `xml:"DocBody"`
}

type OFDReader

type OFDReader struct {
	// contains filtered or unexported fields
}

func NewOFDReader

func NewOFDReader(path string, opts ...Option) (*OFDReader, error)

func (*OFDReader) Close

func (ofdReader *OFDReader) Close() error

func (*OFDReader) GetDocumentById

func (ofdReader *OFDReader) GetDocumentById(docId string) (*Document, error)

func (*OFDReader) GetFileContent

func (ofdReader *OFDReader) GetFileContent(path string) ([]byte, error)

func (*OFDReader) GetSignaturesById

func (ofdReader *OFDReader) GetSignaturesById(docId string) (*Signatures, error)

func (*OFDReader) OFD

func (ofdReader *OFDReader) OFD() (*OFD, error)

type ObjType

type ObjType string

type Option

type Option func(opt *Options)

func WithValidator

func WithValidator(validator Validator) Option

type Options

type Options struct {
	// contains filtered or unexported fields
}

type Page

type Page struct {
	PageXml
	// contains filtered or unexported fields
}

type PageXml

type PageXml struct {
	XMLName xml.Name `xml:"Page"`
	Text    string   `xml:",chardata"`
	Ofd     string   `xml:"ofd,attr"`
	Area    struct {
		Text        string `xml:",chardata"`
		PhysicalBox struct {
			Text string `xml:",chardata"`
		} `xml:"PhysicalBox"`
	} `xml:"Area"`
	Content struct {
		Text  string `xml:",chardata"`
		Layer struct {
			Text       string `xml:",chardata"`
			ID         string `xml:"ID,attr"`
			TextObject []struct {
				Text     string `xml:",chardata"`
				ID       string `xml:"ID,attr"`
				Boundary string `xml:"Boundary,attr"`
				Font     string `xml:"Font,attr"`
				Size     string `xml:"Size,attr"`
				Weight   string `xml:"Weight,attr"`
				TextCode struct {
					Text   string `xml:",chardata"`
					X      string `xml:"X,attr"`
					Y      string `xml:"Y,attr"`
					DeltaX string `xml:"DeltaX,attr"`
				} `xml:"TextCode"`
			} `xml:"TextObject"`
			PathObject []struct {
				Text            string `xml:",chardata"`
				ID              string `xml:"ID,attr"`
				Boundary        string `xml:"Boundary,attr"`
				LineWidth       string `xml:"LineWidth,attr"`
				AbbreviatedData struct {
					Text string `xml:",chardata"`
				} `xml:"AbbreviatedData"`
			} `xml:"PathObject"`
			ImageObject []struct {
				Text       string `xml:",chardata"`
				ID         string `xml:"ID,attr"`
				Boundary   string `xml:"Boundary,attr"`
				CTM        string `xml:"CTM,attr"`
				ResourceID string `xml:"ResourceID,attr"`
			} `xml:"ImageObject"`
		} `xml:"Layer"`
	} `xml:"Content"`
}

type Pages

type Pages struct {
	PagesXml
	// contains filtered or unexported fields
}

func (*Pages) GetFileContent

func (pages *Pages) GetFileContent(path string) ([]byte, error)

func (*Pages) GetPageById

func (pages *Pages) GetPageById(pageId string) (*Page, error)

func (*Pages) GetPages

func (pages *Pages) GetPages() ([]Page, error)

type PagesXml

type PagesXml struct {
	Text string `xml:",chardata"`
	Page []struct {
		Text    string `xml:",chardata"`
		ID      string `xml:"ID,attr"`
		BaseLoc string `xml:"BaseLoc,attr"`
	} `xml:"Page"`
}

type PublicRes

type PublicRes struct {
	PublicResXml
	// contains filtered or unexported fields
}

func (*PublicRes) GetFileContent

func (publicRes *PublicRes) GetFileContent(path string) ([]byte, error)

type PublicResXml

type PublicResXml struct {
	XMLName xml.Name `xml:"Res"`
	Text    string   `xml:",chardata"`
	Ofd     string   `xml:"ofd,attr"`
	BaseLoc string   `xml:"BaseLoc,attr"`
	Fonts   struct {
		Text string `xml:",chardata"`
		Font []struct {
			Text     string `xml:",chardata"`
			ID       string `xml:"ID,attr"`
			FontName string `xml:"FontName,attr"`
			Bold     string `xml:"Bold,attr"`
		} `xml:"Font"`
	} `xml:"Fonts"`
}

type Resource

type Resource int
const (
	DOCUMENT Resource = iota
	SIGNATURES
)

type SES_CertList

type SES_CertList struct {
	// contains filtered or unexported fields
}

func New_SES_CertList

func New_SES_CertList(cert_type int64, cert_list cryptobyte.String) (*SES_CertList, error)

func (*SES_CertList) Get_CertDigestList

func (ses_certlist *SES_CertList) Get_CertDigestList() []byte

func (*SES_CertList) Get_Certs

func (ses_certlist *SES_CertList) Get_Certs() []byte

type SES_ESPictrueInfo

type SES_ESPictrueInfo struct {
	Type   string
	Data   []byte
	Width  int64
	Height int64
}

func New_SES_ESPictrueInfo

func New_SES_ESPictrueInfo(pictrue cryptobyte.String) (*SES_ESPictrueInfo, error)

type SES_ESPropertyInfo

type SES_ESPropertyInfo struct {
	Type         int64
	Name         string
	CertListType int64
	CertList     cryptobyte.String
	CreateDate   time.Time
	ValidStart   time.Time
	ValidEnd     time.Time
}

func New_SES_ESPropertyInfo

func New_SES_ESPropertyInfo(ses_property cryptobyte.String) (*SES_ESPropertyInfo, error)

func (*SES_ESPropertyInfo) Get_CertList

func (ses_property_info *SES_ESPropertyInfo) Get_CertList() (*SES_CertList, error)

type SES_Header

type SES_Header struct {
	ID      string //id
	Version int64  //version
	Vid     string //vid
}

func New_SES_Header

func New_SES_Header(ses_header cryptobyte.String) (*SES_Header, error)

type SES_Seal_Info

type SES_Seal_Info struct {
	// contains filtered or unexported fields
}

func New_SES_Seal_Info

func New_SES_Seal_Info(input cryptobyte.String) (*SES_Seal_Info, error)

func (*SES_Seal_Info) Get_ESID

func (ses_seal_info *SES_Seal_Info) Get_ESID() string

func (*SES_Seal_Info) Get_ExtDatas

func (ses_seal_info *SES_Seal_Info) Get_ExtDatas() (*ExtensionDatas, error)

func (*SES_Seal_Info) Get_Header

func (ses_seal_info *SES_Seal_Info) Get_Header() (*SES_Header, error)

func (*SES_Seal_Info) Get_Pictrue

func (ses_seal_info *SES_Seal_Info) Get_Pictrue() (*SES_ESPictrueInfo, error)

func (*SES_Seal_Info) Get_Property

func (ses_seal_info *SES_Seal_Info) Get_Property() (*SES_ESPropertyInfo, error)

type SES_Signature

type SES_Signature struct {
	// contains filtered or unexported fields
}

func New_SES_Signature

func New_SES_Signature(input cryptobyte.String) (*SES_Signature, error)

func (*SES_Signature) Get_Cert

func (ses *SES_Signature) Get_Cert() ([]byte, error)

func (*SES_Signature) Get_Signature

func (ses *SES_Signature) Get_Signature() []byte

func (*SES_Signature) Get_SignatureAlgId

func (ses *SES_Signature) Get_SignatureAlgId() string

func (*SES_Signature) Get_TBS_Sign

func (ses *SES_Signature) Get_TBS_Sign() (*TBS_Sign, error)

type SESeal

type SESeal struct {
	// contains filtered or unexported fields
}

func New_SESeal

func New_SESeal(seSeal cryptobyte.String) (*SESeal, error)

func (*SESeal) Get_Cert

func (seal *SESeal) Get_Cert() ([]byte, error)

func (*SESeal) Get_SES_SealInfo

func (seal *SESeal) Get_SES_SealInfo() (*SES_Seal_Info, error)

func (*SESeal) Get_Signature

func (seal *SESeal) Get_Signature() []byte

func (*SESeal) Get_SignatureAlgId

func (seal *SESeal) Get_SignatureAlgId() string

type Signature

type Signature struct {
	SignatureXml

	Validator
	Category
	Content []byte
	// contains filtered or unexported fields
}

func (Signature) GetFileContent

func (signature Signature) GetFileContent(path string) ([]byte, error)

func (Signature) Verify

func (signature Signature) Verify() (bool, error)

func (Signature) VerifyDigest

func (signature Signature) VerifyDigest() (bool, error)

type SignatureXml

type SignatureXml struct {
	XMLName    xml.Name `xml:"Signature"`
	Text       string   `xml:",chardata"`
	Ofd        string   `xml:"ofd,attr"`
	SignedInfo struct {
		Text     string `xml:",chardata"`
		Provider struct {
			Text         string `xml:",chardata"`
			ProviderName string `xml:"ProviderName,attr"`
			Version      string `xml:"Version,attr"`
			Company      string `xml:"Company,attr"`
		} `xml:"Provider"`
		SignatureMethod struct {
			Text string `xml:",chardata"`
		} `xml:"SignatureMethod"`
		SignatureDateTime struct {
			Text string `xml:",chardata"`
		} `xml:"SignatureDateTime"`
		Parameters struct {
			Text      string `xml:",chardata"`
			Parameter struct {
				Text string `xml:",chardata"`
				Name string `xml:"Name,attr"`
			} `xml:"Parameter"`
		} `xml:"Parameters"`
		References struct {
			Text        string `xml:",chardata"`
			CheckMethod string `xml:"CheckMethod,attr"`
			Reference   []struct {
				Text       string `xml:",chardata"`
				FileRef    string `xml:"FileRef,attr"`
				CheckValue struct {
					Text string `xml:",chardata"`
				} `xml:"CheckValue"`
			} `xml:"Reference"`
		} `xml:"References"`
		StampAnnot struct {
			Text     string `xml:",chardata"`
			ID       string `xml:"ID,attr"`
			PageRef  string `xml:"PageRef,attr"`
			Boundary string `xml:"Boundary,attr"`
		} `xml:"StampAnnot"`
	} `xml:"SignedInfo"`
	SignedValue struct {
		Text string `xml:",chardata"`
	} `xml:"SignedValue"`
}

type Signatures

type Signatures struct {
	SignaturesXml

	Validator
	// contains filtered or unexported fields
}

func (Signatures) GetFileContent

func (signatures Signatures) GetFileContent(path string) ([]byte, error)

func (Signatures) GetSignatureById

func (signatures Signatures) GetSignatureById(signId string) (*Signature, error)

type SignaturesXml

type SignaturesXml struct {
	XMLName   xml.Name `xml:"Signatures"`
	Text      string   `xml:",chardata"`
	Ofd       string   `xml:"ofd,attr"`
	MaxSignId struct {
		Text string `xml:",chardata"`
	} `xml:"MaxSignId"`
	Signature []struct {
		Text    string `xml:",chardata"`
		ID      string `xml:"ID,attr"`
		Type    string `xml:"Type,attr"`
		BaseLoc string `xml:"BaseLoc,attr"`
	} `xml:"Signature"`
}

type SignedData

type SignedData struct {
	// contains filtered or unexported fields
}

func NewSignedData

func NewSignedData(content cryptobyte.String) (*SignedData, error)

func (*SignedData) GetCertificates

func (signedData *SignedData) GetCertificates() []byte

func (*SignedData) GetSignerInfos

func (signedData *SignedData) GetSignerInfos() ([]SignerInfo, error)

type SignerInfo

type SignerInfo struct {
	// contains filtered or unexported fields
}

func NewSignerInfo

func NewSignerInfo(signInfo cryptobyte.String) (*SignerInfo, error)

func (*SignerInfo) GetAuthenticatedAttributes

func (signerInfo *SignerInfo) GetAuthenticatedAttributes() cryptobyte.String

func (*SignerInfo) GetDigestAlgorithm

func (signerInfo *SignerInfo) GetDigestAlgorithm() string

func (*SignerInfo) GetDigestEncryptionAlgorithm

func (signerInfo *SignerInfo) GetDigestEncryptionAlgorithm() string

func (*SignerInfo) GetEncryptedDigest

func (signerInfo *SignerInfo) GetEncryptedDigest() cryptobyte.String

func (*SignerInfo) GetIssuerAndSerialNumber

func (signerInfo *SignerInfo) GetIssuerAndSerialNumber() cryptobyte.String

func (*SignerInfo) GetUnauthenticatedAttributes

func (signerInfo *SignerInfo) GetUnauthenticatedAttributes() cryptobyte.String

func (*SignerInfo) GetVersion

func (signerInfo *SignerInfo) GetVersion() int64

type TBS_Sign

type TBS_Sign struct {
	// contains filtered or unexported fields
}

func New_TBS_Sign

func New_TBS_Sign(input cryptobyte.String) (*TBS_Sign, error)

func (*TBS_Sign) Get_DataHash

func (tbs *TBS_Sign) Get_DataHash() []byte

func (*TBS_Sign) Get_Seal

func (tbs *TBS_Sign) Get_Seal() (*SESeal, error)

func (*TBS_Sign) Get_Version

func (tbs *TBS_Sign) Get_Version() int64

type Validator

type Validator interface {
	Hash

	Verify([]byte, []byte, []byte) (bool, error)
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL