Skip to content

Commit

Permalink
更新
Browse files Browse the repository at this point in the history
  • Loading branch information
deatil committed Jun 12, 2024
1 parent 99bc39f commit 97c8de0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions cryptobin/ecdh/parse.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ func (this ECDH) ParseECDHPrivateKeyFromPEM(key []byte) (crypto.PrivateKey, erro
return nil, ErrNotPrivateKey
}

return cryptobin_ecdh.MarshalPrivateKey(pkey)
return cryptobin_ecdh.ToPrivateKey(pkey)
}

// 解析私钥带密码
Expand Down Expand Up @@ -175,7 +175,7 @@ func (this ECDH) ParseECDHPrivateKeyFromPEMWithPassword(key []byte, password str
return nil, ErrNotPrivateKey
}

return cryptobin_ecdh.MarshalPrivateKey(pkey)
return cryptobin_ecdh.ToPrivateKey(pkey)
}

// 解析公钥
Expand All @@ -201,5 +201,5 @@ func (this ECDH) ParseECDHPublicKeyFromPEM(key []byte) (crypto.PublicKey, error)
return nil, ErrNotPublicKey
}

return cryptobin_ecdh.MarshalPublicKey(pkey)
return cryptobin_ecdh.ToPublicKey(pkey)
}
4 changes: 2 additions & 2 deletions cryptobin/gost/get.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ func (this Gost) GetPrivateKeyBytes() []byte {
return nil
}

return gost.MarshalPrivateKey(privateKey)
return gost.ToPrivateKey(privateKey)
}

// 获取 PublicKey
Expand All @@ -31,7 +31,7 @@ func (this Gost) GetPublicKeyBytes() []byte {
return nil
}

return gost.MarshalPublicKey(publicKey)
return gost.ToPublicKey(publicKey)
}

// 获取 Curve
Expand Down

0 comments on commit 97c8de0

Please sign in to comment.