Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RandomBytes ¶
RandomBytes generates cryptographically secure pseudorandom numbers byte array
Types ¶
type NegotiationSession ¶
type NegotiationSession struct {
// contains filtered or unexported fields
}
func (*NegotiationSession) Get ¶
func (ns *NegotiationSession) Get() ([]byte, error)
func (*NegotiationSession) Validate ¶
func (ns *NegotiationSession) Validate(message []byte) (bool, error)
func (*NegotiationSession) ValidateWithPrefix ¶
func (ns *NegotiationSession) ValidateWithPrefix(prefix []byte, message []byte) (bool, error)
type PredefinedKey ¶
type PredefinedKey struct {
// contains filtered or unexported fields
}
func NewPredefinedKey ¶
func NewPredefinedKey(private *rsa.PrivateKey, prefix []byte) *PredefinedKey
func NewRandomPredefinedKey ¶
func NewRandomPredefinedKey() *PredefinedKey
func (*PredefinedKey) CreateNegotiationSession ¶
func (pk *PredefinedKey) CreateNegotiationSession() *NegotiationSession
func (*PredefinedKey) EncryptWithPrefix ¶
func (pk *PredefinedKey) EncryptWithPrefix(message []byte) ([]byte, error)
Click to show internal directories.
Click to hide internal directories.