// SetupEncryptionKey calculates and internally sets encryption key `K` based on salt and info
//
// Only 32 bytes are used from HKDF-SHA512
191385
func (p *SetupServerSession) SetupEncryptionKey(salt []byte, info []byte) error {
	hash, err := hkdf.Sha512(p.PrivateKey, salt, info)
	if err == nil {
		p.EncryptionKey = hash
	}

	return err
}
762278
func (s *InventoryS3BucketDestination) SetEncryption(v *InventoryEncryption) *InventoryS3BucketDestination {
	s.Encryption = v
	return s
}
159027
func (s *StreamDescriptionSummary) SetEncryptionType(v string) *StreamDescriptionSummary {
	s.EncryptionType = &v
	return s
}
168592
func (s *S3DestinationConfiguration) SetEncryptionConfiguration(v *EncryptionConfiguration) *S3DestinationConfiguration {
	s.EncryptionConfiguration = v
	return s
}
1160024
func (s *S3EncryptionSettings) SetEncryptionType(v string) *S3EncryptionSettings {
	s.EncryptionType = &v
	return s
}
255209
func (s *PublicKeyConfig) SetEncodedKey(v string) *PublicKeyConfig {
	s.EncodedKey = &v
	return s
}
1352591
func (s *GetEncryptionConfigOutput) SetEncryptionConfig(v *EncryptionConfig) *GetEncryptionConfigOutput {
	s.EncryptionConfig = v
	return s
}
61567
func (c *cipherState) InitializeKey(key [32]byte) {
	c.secretKey = key
	c.nonce = 0

	// Safe to ignore the error here as our key is properly sized
	// (32-bytes).
	c.cipher, _ = chacha20poly1305.New(c.secretKey[:])
}
130491
func (s *MssPackage) SetEncryption(v *MssEncryption) *MssPackage {
	s.Encryption = v
	return s
}
197801
func (s *ResultConfigurationUpdates) SetEncryptionConfiguration(v *EncryptionConfiguration) *ResultConfigurationUpdates {
	s.EncryptionConfiguration = v
	return s
}
340586
func (s *DashIsoGroupSettings) SetEncryption(v *DashIsoEncryptionSettings) *DashIsoGroupSettings {
	s.Encryption = v
	return s
}
1008134
func (s *PutEncryptionConfigOutput) SetEncryptionConfig(v *EncryptionConfig) *PutEncryptionConfigOutput {
	s.EncryptionConfig = v
	return s
}
1158431
func (s *RecoveryPointByResource) SetEncryptionKeyArn(v string) *RecoveryPointByResource {
	s.EncryptionKeyArn = &v
	return s
}
299536
func (s *SecurityConfiguration) SetEncryptionConfiguration(v *EncryptionConfiguration) *SecurityConfiguration {
	s.EncryptionConfiguration = v
	return s
}
776748
func (s *InputDecryptionSettings) SetEncryptedDecryptionKey(v string) *InputDecryptionSettings {
	s.EncryptedDecryptionKey = &v
	return s
}
1035274
func (p *SetupServerSession) SetupPrivateKeyFromClientPublicKey(key []byte) error {
	key, err := p.session.ComputeKey(key) // S
	if err == nil {
		p.PrivateKey = key
	}

	return err
}
1190618
func (s *CreateSecurityConfigurationInput) SetEncryptionConfiguration(v *EncryptionConfiguration) *CreateSecurityConfigurationInput {
	s.EncryptionConfiguration = v
	return s
}