Exemplo n.º 1
0
// AbsGenerateKey generates a base64-encoded key suitable for the absolute
// armoured encryption functions.
func AbsGenerateKey() (key []byte, err error) {
	rawkey, err := symmetric.GenerateKey()
	if err != nil {
		return
	}

	key = EncodeBase64(rawkey)
	return
}
Exemplo n.º 2
0
func GenerateKey() ([]byte, error) {
	return symmetric.GenerateKey()
}