- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 15 for SignerOpts (0.42 sec)
-
src/crypto/crypto.go
// the hash (as digest) and the hash function (as opts) to Sign. Sign(rand io.Reader, digest []byte, opts SignerOpts) (signature []byte, err error) } // SignerOpts contains options for signing with a [Signer]. type SignerOpts interface { // HashFunc returns an identifier for the hash function used to produce // the message passed to Signer.Sign, or else zero to indicate that no
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Oct 13 17:09:47 UTC 2023 - 6.8K bytes - Viewed (0) -
api/go1.4.txt
pkg crypto, type Signer interface, Sign(io.Reader, []uint8, SignerOpts) ([]uint8, error) pkg crypto, type SignerOpts interface { HashFunc } pkg crypto, type SignerOpts interface, HashFunc() Hash pkg crypto/ecdsa, method (*PrivateKey) Public() crypto.PublicKey pkg crypto/ecdsa, method (*PrivateKey) Sign(io.Reader, []uint8, crypto.SignerOpts) ([]uint8, error) pkg crypto/rsa, method (*PSSOptions) HashFunc() crypto.Hash
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Dec 12 03:01:01 UTC 2014 - 34K bytes - Viewed (0) -
src/crypto/ed25519/ed25519.go
// // A value of type [Options] can be used as opts, or crypto.Hash(0) or // crypto.SHA512 directly to select plain Ed25519 or Ed25519ph, respectively. func (priv PrivateKey) Sign(rand io.Reader, message []byte, opts crypto.SignerOpts) (signature []byte, err error) { hash := opts.HashFunc() context := "" if opts, ok := opts.(*Options); ok { context = opts.Context } switch { case hash == crypto.SHA512: // Ed25519ph
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 00:11:18 UTC 2024 - 11.7K bytes - Viewed (0) -
src/crypto/tls/key_agreement.go
} signed := hashForServerKeyExchange(sigType, sigHash, ka.version, clientHello.random, hello.random, serverECDHEParams) signOpts := crypto.SignerOpts(sigHash) if sigType == signatureRSAPSS { signOpts = &rsa.PSSOptions{SaltLength: rsa.PSSSaltLengthEqualsHash, Hash: sigHash} } sig, err := priv.Sign(config.rand(), signed, signOpts) if err != nil {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 22 14:56:25 UTC 2024 - 11.8K bytes - Viewed (0) -
src/crypto/rsa/pss.go
// zero, it overrides the hash function passed to SignPSS. It's required // when using PrivateKey.Sign. Hash crypto.Hash } // HashFunc returns opts.Hash so that [PSSOptions] implements [crypto.SignerOpts]. func (opts *PSSOptions) HashFunc() crypto.Hash { return opts.Hash } func (opts *PSSOptions) saltLength() int { if opts == nil { return PSSSaltLengthAuto } return opts.SaltLength }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 00:11:18 UTC 2024 - 11K bytes - Viewed (0) -
src/crypto/x509/x509.go
h := hashFunc.New() h.Write(signed) signed = h.Sum(nil) } var signerOpts crypto.SignerOpts = hashFunc if sigAlg.isRSAPSS() { signerOpts = &rsa.PSSOptions{ SaltLength: rsa.PSSSaltLengthEqualsHash, Hash: hashFunc, } } signature, err := key.Sign(rand, signed, signerOpts) if err != nil { return nil, err }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 22 09:20:15 UTC 2024 - 82K bytes - Viewed (0) -
src/crypto/ecdsa/ecdsa.go
// where the private part is kept in, for example, a hardware module. Common // uses can use the [SignASN1] function in this package directly. func (priv *PrivateKey) Sign(rand io.Reader, digest []byte, opts crypto.SignerOpts) ([]byte, error) { return SignASN1(rand, priv, digest) } // GenerateKey generates a new ECDSA private key for the specified curve. // // Most applications should use [crypto/rand.Reader] as rand. Note that the
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 00:11:18 UTC 2024 - 20.4K bytes - Viewed (0) -
src/crypto/rsa/rsa.go
// where the private part is kept in, for example, a hardware module. Common // uses should use the Sign* functions in this package directly. func (priv *PrivateKey) Sign(rand io.Reader, digest []byte, opts crypto.SignerOpts) ([]byte, error) { if pssOpts, ok := opts.(*PSSOptions); ok { return SignPSS(rand, priv, pssOpts.Hash, digest, pssOpts) } return SignPKCS1v15(rand, priv, opts.HashFunc(), digest) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 00:11:18 UTC 2024 - 23.4K bytes - Viewed (0) -
src/crypto/tls/handshake_client_tls13.go
if err != nil { return c.sendAlert(alertInternalError) } signed := signedMessage(sigHash, clientSignatureContext, hs.transcript) signOpts := crypto.SignerOpts(sigHash) if sigType == signatureRSAPSS { signOpts = &rsa.PSSOptions{SaltLength: rsa.PSSSaltLengthEqualsHash, Hash: sigHash} } sig, err := cert.PrivateKey.(crypto.Signer).Sign(c.config.rand(), signed, signOpts)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 03:10:12 UTC 2024 - 27.9K bytes - Viewed (0) -
src/crypto/tls/handshake_server_tls13.go
if err != nil { return c.sendAlert(alertInternalError) } signed := signedMessage(sigHash, serverSignatureContext, hs.transcript) signOpts := crypto.SignerOpts(sigHash) if sigType == signatureRSAPSS { signOpts = &rsa.PSSOptions{SaltLength: rsa.PSSSaltLengthEqualsHash, Hash: sigHash} } sig, err := hs.cert.PrivateKey.(crypto.Signer).Sign(c.config.rand(), signed, signOpts)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 22 17:23:54 UTC 2024 - 30.5K bytes - Viewed (0)