Documentation
¶
Index ¶
- Variables
- func InitiateHSM() (*hsm.Crypto, uint, pkcs11.SessionHandle)
- func LogoutHSM(c *hsm.Crypto, session pkcs11.SessionHandle) error
- func RandStringBytes(n int) string
- func ReinitializeHSM(c *hsm.Crypto, session pkcs11.SessionHandle) (*hsm.Crypto, pkcs11.SessionHandle, error)
- type HsmObject
- func (obj *HsmObject) GenericGenerateAccount() (nodeconfig.Account, error)
- func (obj *HsmObject) GenericSign(txeBuilder *build.TransactionEnvelopeBuilder, accounts ...nodeconfig.Account) (build.TransactionEnvelopeBuilder, error)
- func (obj *HsmObject) GenericSignPayload(payload []byte, acc nodeconfig.Account) ([]byte, error)
- func (obj *HsmObject) GenericVerifySignatureIdentity(unsignedMsg []byte, signedMsg []byte, account nodeconfig.Account) (bool, error)
- func (obj *HsmObject) SignUsingHSMPrivateKeyHandle(payload []byte, privateKeyLabel string) ([]byte, error)
- func (obj *HsmObject) SignXML(xml, privateKeyHandle string, publicKey string, signUsingStellar bool) (string, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var LOGGER = logging.MustGetLogger("utils")
Functions ¶
func InitiateHSM ¶
func InitiateHSM() (*hsm.Crypto, uint, pkcs11.SessionHandle)
Open a HSM session with the specific slot then login with the pin code.
func RandStringBytes ¶
func ReinitializeHSM ¶
func ReinitializeHSM(c *hsm.Crypto, session pkcs11.SessionHandle) (*hsm.Crypto, pkcs11.SessionHandle, error)
Types ¶
type HsmObject ¶
type HsmObject struct { C *hsm.Crypto Slot uint Session pkcs11.SessionHandle }
func (*HsmObject) GenericGenerateAccount ¶
func (obj *HsmObject) GenericGenerateAccount() (nodeconfig.Account, error)
create a new account using either HSM or Stellar SDK
func (*HsmObject) GenericSign ¶
func (obj *HsmObject) GenericSign(txeBuilder *build.TransactionEnvelopeBuilder, accounts ...nodeconfig.Account) (build.TransactionEnvelopeBuilder, error)
GenericSign for choosing between HSM/Native Stellar signing
func (*HsmObject) GenericSignPayload ¶
func (*HsmObject) GenericVerifySignatureIdentity ¶
func (*HsmObject) SignUsingHSMPrivateKeyHandle ¶
Click to show internal directories.
Click to hide internal directories.