1234567891011121314151617181920212223242526272829303132 |
- package tencentsig
-
- import (
- "crypto/x509/pkix"
- "encoding/asn1"
- )
-
- var (
- oidPublicKeyECDSA = asn1.ObjectIdentifier{1, 2, 840, 10045, 2, 1}
- oidNamedCurveS256 = asn1.ObjectIdentifier{1, 3, 132, 0, 10}
- )
-
- type pkcs8 struct {
- Version int
- Algo pkix.AlgorithmIdentifier
- PrivateKey []byte
- // optional attributes omitted.
- }
-
- type publicKeyInfo struct {
- Raw asn1.RawContent
- Algorithm pkix.AlgorithmIdentifier
- PublicKey asn1.BitString
- }
-
- type ecPrivateKey struct {
- Version int
- PrivateKey []byte
- NamedCurveOID asn1.ObjectIdentifier `asn1:"optional,explicit,tag:0"`
- PublicKey asn1.BitString `asn1:"optional,explicit,tag:1"`
- }
|