Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for marshalECDHPrivateKey (0.57 sec)

  1. src/crypto/x509/sec1.go

    		NamedCurveOID: oid,
    		PublicKey:     asn1.BitString{Bytes: elliptic.Marshal(key.Curve, key.X, key.Y)},
    	})
    }
    
    // marshalECDHPrivateKey marshals an EC private key into ASN.1, DER format
    // suitable for NIST curves.
    func marshalECDHPrivateKey(key *ecdh.PrivateKey) ([]byte, error) {
    	return asn1.Marshal(ecPrivateKey{
    		Version:    1,
    		PrivateKey: key.Bytes(),
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Oct 13 17:09:47 UTC 2023
    - 4.6K bytes
    - Viewed (0)
  2. src/crypto/x509/pkcs8.go

    			}
    			privKey.Algo = pkix.AlgorithmIdentifier{
    				Algorithm: oidPublicKeyECDSA,
    				Parameters: asn1.RawValue{
    					FullBytes: oidBytes,
    				},
    			}
    			if privKey.PrivateKey, err = marshalECDHPrivateKey(k); err != nil {
    				return nil, errors.New("x509: failed to marshal EC private key while building PKCS#8: " + err.Error())
    			}
    		}
    
    	default:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Oct 13 17:09:47 UTC 2023
    - 5.8K bytes
    - Viewed (0)
Back to top