Skip to content

octabase/go-zamane

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-zamane

WIP

Godoc license

Getting a signed timestamp:

algo := cryptoid.SHA512
digester := algo.Hash.New()

file, _ := os.Open("file-to-be-timestamped.txt")
io.Copy(digester, file)

client, _ := zamane.NewClient("999999", "12345678")

tsq, tsr, _ := client.RequestTimestamp(nil, digester.Sum(nil), algo)

tsqDER, _ := asn1.Marshal(*tsq)
tsrDER, _ := asn1.Marshal(*tsr)

ioutil.WriteFile("file-to-be-timestamped.tsq", tsqDER, 0644)
ioutil.WriteFile("file-to-be-timestamped.tsr", tsrDER, 0644)

Getting the amount of credit remaining:

client, _ := zamane.NewClient("999999", "12345678")
credit, _ := client.RemainingCredit(nil)

fmt.Printf("Remaining credit: %d\n", credit)

Releases

No releases published

Packages

No packages published

Languages