func newAESGCM()

in v3/internal/aes_gcm.go [32:44]


func newAESGCM(materials materials.CryptographicMaterials) (Cipher, error) {
	block, err := aes.NewCipher(materials.Key)
	if err != nil {
		return nil, err
	}

	aesgcm, err := cipher.NewGCM(block)
	if err != nil {
		return nil, err
	}

	return &aesGCM{aesgcm, materials.IV}, nil
}