1 Commits

Author SHA1 Message Date
Michael Muré
8c8da51656 Expose the hash on all varsig 2025-07-29 15:22:15 +02:00
3 changed files with 7 additions and 27 deletions

View File

@@ -1,27 +0,0 @@
on: [push, pull_request]
name: Go Test
jobs:
unit:
strategy:
fail-fast: false
matrix:
os: [ "ubuntu" ]
go: [ "1.23.x", "1.24.x"]
env:
COVERAGES: ""
runs-on: ${{ matrix.os }}-latest
name: ${{ matrix.os}} (go ${{ matrix.go }})
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}
- name: Go information
run: |
go version
go env
- name: Run tests
run: go test -v ./...
- name: Check formatted
run: gofmt -l .

View File

@@ -61,6 +61,10 @@ func (v testVarsig) Discriminator() varsig.Discriminator {
return v.disc
}
func (v testVarsig) Hash() varsig.Hash {
return varsig.HashUnspecified
}
func (v testVarsig) PayloadEncoding() varsig.PayloadEncoding {
return v.payEnc
}

View File

@@ -32,6 +32,9 @@ type Varsig interface {
// Discriminator returns the algorithm used to produce the corresponding signature.
Discriminator() Discriminator
// Hash returns the hash used on the data before signature.
Hash() Hash
// PayloadEncoding returns the codec that was used to encode the signed data.
PayloadEncoding() PayloadEncoding