Skip to content

Latest commit

 

History

History
19 lines (14 loc) · 486 Bytes

README.md

File metadata and controls

19 lines (14 loc) · 486 Bytes

GoDoc

tpmlib

Simple library to connect to local tpm, generate a local key and use it as a signer.

Usage

import "github.com/KarpelesLab/tpmlib"

func signSomething(v []byte) ([]byte, error) {
    k, err := tpmlib.GetKey()
    if err != nil {
        return nil, err
    }
    return k.Sign(rand.Reader, cryptutil.Hash(v, crypto.SHA256), crypto.SHA256)
}