crypto: align file name with the VerificationMethod name
This commit is contained in:
@@ -12,7 +12,7 @@ import (
|
||||
_ "github.com/INFURA/go-did/methods/did-key"
|
||||
)
|
||||
|
||||
func ExampleSignature() {
|
||||
func Example_signature() {
|
||||
// errors need to be handled
|
||||
|
||||
// 1) Parse the DID string into a DID object
|
||||
@@ -32,7 +32,7 @@ func ExampleSignature() {
|
||||
// Output: Signature is valid, verified with method: Ed25519VerificationKey2020 did:key:z6MknwcywUtTy2ADJQ8FH1GcSySKPyKDmyzT4rPEE84XREse#z6MknwcywUtTy2ADJQ8FH1GcSySKPyKDmyzT4rPEE84XREse
|
||||
}
|
||||
|
||||
func ExampleKeyAgreement() {
|
||||
func Example_keyAgreement() {
|
||||
// errors need to be handled
|
||||
|
||||
// 1) We have a private key for Alice
|
||||
|
||||
@@ -122,7 +122,7 @@ func (d DidKey) Document(opts ...did.ResolutionOption) (did.Document, error) {
|
||||
jwk := jsonwebkey.NewJsonWebKey2020(mainVmId, pub, d)
|
||||
doc.signature = jwk
|
||||
doc.keyAgreement = jwk
|
||||
case params.HasVerificationMethodHint(secp256k1vm.Type):
|
||||
case params.HasVerificationMethodHint(secp256k1vm.Type2019):
|
||||
vm := secp256k1vm.NewVerificationKey2019(mainVmId, pub, d)
|
||||
doc.signature = vm
|
||||
doc.keyAgreement = vm
|
||||
|
||||
@@ -183,7 +183,7 @@ func LoadTestVectors(filename string) ([]Vector, error) {
|
||||
}
|
||||
|
||||
switch vmType {
|
||||
case secp256k1vm.Type:
|
||||
case secp256k1vm.Type2019:
|
||||
vect.Pub, err = secp256k1.PublicKeyFromBytes(pubBytes)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
||||
@@ -31,7 +31,7 @@ func UnmarshalJSON(data []byte) (did.VerificationMethod, error) {
|
||||
res = &multikey.MultiKey{}
|
||||
case p256vm.Type2021:
|
||||
res = &p256vm.Key2021{}
|
||||
case secp256k1vm.Type:
|
||||
case secp256k1vm.Type2019:
|
||||
res = &secp256k1vm.VerificationKey2019{}
|
||||
case x25519vm.Type2019:
|
||||
res = &x25519vm.KeyAgreementKey2019{}
|
||||
|
||||
@@ -16,7 +16,7 @@ import (
|
||||
|
||||
const (
|
||||
JsonLdContext = "https://w3id.org/security/suites/secp256k1-2019/v1"
|
||||
Type = "EcdsaSecp256k1VerificationKey2019"
|
||||
Type2019 = "EcdsaSecp256k1VerificationKey2019"
|
||||
)
|
||||
|
||||
var _ did.VerificationMethodSignature = &VerificationKey2019{}
|
||||
@@ -90,7 +90,7 @@ func (vm VerificationKey2019) ID() string {
|
||||
}
|
||||
|
||||
func (vm VerificationKey2019) Type() string {
|
||||
return Type
|
||||
return Type2019
|
||||
}
|
||||
|
||||
func (vm VerificationKey2019) Controller() string {
|
||||
Reference in New Issue
Block a user