<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ThinkChat2.0新版上線,更智能更精彩,支持會話、畫圖、視頻、閱讀、搜索等,送10W Token,即刻開啟你的AI之旅 廣告
                # package ecdsa `import "crypto/ecdsa"` ecdsa包實現了橢圓曲線數字簽名算法,參見FIPS 186-3。 ## Index * [type PublicKey](#PublicKey) * [type PrivateKey](#PrivateKey) * [func GenerateKey(c elliptic.Curve, rand io.Reader) (priv \*PrivateKey, err error)](#GenerateKey) * [func Sign(rand io.Reader, priv \*PrivateKey, hash []byte) (r, s \*big.Int, err error)](#Sign) * [func Verify(pub \*PublicKey, hash []byte, r, s \*big.Int) bool](#Verify) ## type [PublicKey](https://github.com/golang/go/blob/master/src/crypto/ecdsa/ecdsa.go#L22 "View Source") ``` type PublicKey struct { elliptic.Curve X, Y *big.Int } ``` PrivateKey代表一個ECDSA公鑰。 ## type [PrivateKey](https://github.com/golang/go/blob/master/src/crypto/ecdsa/ecdsa.go#L28 "View Source") ``` type PrivateKey struct { PublicKey D *big.Int } ``` PrivateKey代表一個ECDSA私鑰。 ### func [GenerateKey](https://github.com/golang/go/blob/master/src/crypto/ecdsa/ecdsa.go#L53 "View Source") GenerateKey函數生成一對 ``` func GenerateKey(c elliptic.Curve, rand io.Reader) (priv *PrivateKey, err error) ``` 公鑰/私鑰。 ## func [Sign](https://github.com/golang/go/blob/master/src/crypto/ecdsa/ecdsa.go#L101 "View Source") ``` func Sign(rand io.Reader, priv *PrivateKey, hash []byte) (r, s *big.Int, err error) ``` 使用私鑰對任意長度的hash值(必須是較大信息的hash結果)進行簽名,返回簽名結果(一對大整數)。私鑰的安全性取決于密碼讀取器的熵度(隨機程度)。 ## func [Verify](https://github.com/golang/go/blob/master/src/crypto/ecdsa/ecdsa.go#L138 "View Source") ``` func Verify(pub *PublicKey, hash []byte, r, s *big.Int) bool ``` 使用公鑰驗證hash值和兩個大整數r、s構成的簽名,并返回簽名是否合法。
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看