vault: Default key size to 256bit.

This commit is contained in:
Armon Dadgar 2015-04-15 13:33:40 -07:00
parent 3ee434a783
commit e6fd2f2ce5
1 changed files with 2 additions and 1 deletions

View File

@ -120,7 +120,8 @@ func (b *AESGCMBarrier) Initialize(key []byte) error {
// GenerateKey is used to generate a new key
func (b *AESGCMBarrier) GenerateKey() ([]byte, error) {
buf := make([]byte, aes.BlockSize)
// Generate a 256bit key
buf := make([]byte, 2*aes.BlockSize)
_, err := rand.Read(buf)
return buf, err
}