Documentation ¶
Index ¶
- Variables
- type HashAlg
- type Signature
- type SignatureAlg
- type SignatureHeaderJws
- type SignatureJws
- type Signer
- func NewSignerWithLocalCertificate(key key.LocalCertificate, hashAlg *HashAlg) Signer
- func NewSignerWithLocalKey(key key.LocalKey, hashAlg *HashAlg) Signer
- func NewSignerWithManagedCertificate(key key.ManagedCertificate, hashAlg *HashAlg) Signer
- func NewSignerWithManagedKey(key key.ManagedKey, hashAlg *HashAlg) Signer
Constants ¶
This section is empty.
Variables ¶
View Source
var ( HashAlgFromProto = map[proto.HashAlg]HashAlg{ proto.HashAlg_SHA_256: Sha256, proto.HashAlg_KECCAK_256: Keccak256, proto.HashAlg_POSEIDON: Poseidon, proto.HashAlg_NONE: None, } HashAlgToProto = map[HashAlg]*proto.HashAlg{ Sha256: proto.HashAlg_SHA_256.Enum(), Keccak256: proto.HashAlg_KECCAK_256.Enum(), Poseidon: proto.HashAlg_POSEIDON.Enum(), None: proto.HashAlg_NONE.Enum(), } )
View Source
var ( SignatureAlgFromProto = map[string]SignatureAlg{ "ES256K": ECDSA, "ENS": ENS, "BJJ": BJJ, } )
Functions ¶
This section is empty.
Types ¶
type Signature ¶
func NewSignatureFromProto ¶
func (*Signature) GetAlg ¶
func (s *Signature) GetAlg() SignatureAlg
type SignatureAlg ¶
type SignatureAlg int32
const ( ECDSA SignatureAlg = iota ENS SignatureAlg = iota BJJ SignatureAlg = iota UNRECOGNIZED_SIGNATURE_ALG SignatureAlg = -1 )
type SignatureHeaderJws ¶ added in v2.7.0
func NewSignatureHeaderJwsFromProto ¶ added in v2.7.0
func NewSignatureHeaderJwsFromProto(s *proto.SignatureHeaderJWS) SignatureHeaderJws
func (SignatureHeaderJws) ToProto ¶ added in v2.7.0
func (s SignatureHeaderJws) ToProto() *proto.SignatureHeaderJWS
type SignatureJws ¶ added in v2.7.0
type SignatureJws struct { Signature string Protected string Header SignatureHeaderJws MessageHash string }
func NewSignatureJwsFromProto ¶ added in v2.7.0
func NewSignatureJwsFromProto(s *proto.SignatureJWS) SignatureJws
func (*SignatureJws) GetAlg ¶ added in v2.7.0
func (s *SignatureJws) GetAlg() SignatureAlg
func (SignatureJws) ToProto ¶ added in v2.7.0
func (s SignatureJws) ToProto() *proto.SignatureJWS
type Signer ¶
type Signer struct { LocalKey *key.LocalKey ManagedKey *key.ManagedKey ManagedCertificate *key.ManagedCertificate LocalCertificate *key.LocalCertificate HashAlg *HashAlg }
func NewSignerWithLocalCertificate ¶ added in v2.7.0
func NewSignerWithLocalCertificate(key key.LocalCertificate, hashAlg *HashAlg) Signer
func NewSignerWithLocalKey ¶ added in v2.7.0
func NewSignerWithManagedCertificate ¶ added in v2.7.0
func NewSignerWithManagedCertificate(key key.ManagedCertificate, hashAlg *HashAlg) Signer
func NewSignerWithManagedKey ¶ added in v2.7.0
func NewSignerWithManagedKey(key key.ManagedKey, hashAlg *HashAlg) Signer
Click to show internal directories.
Click to hide internal directories.