Example #1
0
// NewSecretKey makes a new SecretKey from the raw 32-byte arrays
// the represent Box public and secret keys.
func NewSecretKey(pub, sec *[32]byte) SecretKey {
	return SecretKey{
		sec: saltpack.RawBoxKey(*sec),
		pub: PublicKey(*pub),
	}
}
Example #2
0
// ToRawBoxKeyPointer returns a RawBoxKey from a given public key.
// A RawBoxKey is just a bunch of bytes that can be used in
// the lower-level Box libraries.
func (k PublicKey) ToRawBoxKeyPointer() *saltpack.RawBoxKey {
	ret := saltpack.RawBoxKey(k)
	return &ret
}