Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type X509Certificate ¶
type X509Certificate struct {
*x509.Certificate
}
X509Certificate embeds an x509.Certificate and implements the Identity interface.
func NewX509Certificate ¶
func NewX509Certificate(cert *x509.Certificate) *X509Certificate
NewX509Certificate extends an x509.Certificate instance with a set of convenience methods.
func (*X509Certificate) GetAddress ¶
func (c *X509Certificate) GetAddress() string
GetAddress returns a 64 character hex representation of the public key.
func (*X509Certificate) GetBitcoinAddress ¶
func (c *X509Certificate) GetBitcoinAddress() string
GetBitcoinAddress returns a Bitcoin compatiable address based on the public key.
func (*X509Certificate) GetEthereumAddress ¶
func (c *X509Certificate) GetEthereumAddress() string
GetEthereumAddress returns an Ethereum compatible address based on the public key.
type X509Identity ¶
type X509Identity interface { // Returns the public key associated with the underlying identity. GetPublicKey() interface{} // GetAddress returns a custom string representation of the public // key. GetAddress() string // GetBitcoinAddress returns a Bitcoin compatiable address based on // the public key. GetBitcoinAddress() string // GetEthereumAddress returns an Ethereum compatible address based // on the public key. GetEthereumAddress() string // GetAttribute returns the attribute value of the specified key. GetAttribute(key string) string // GetIssuer returns the issuing authority of the x509 certificate. GetIssuer() string }
X509Identity interface allows for accessing properties of the underlying x509 identity representation. The current interface allows retrieving various forms of addresses compatible with different blockchain protocol implementations.