> **Experimental**
>
> `@aws-cdk/aws-mediaconnect-alpha` is an [**experimental**](/stability) (alpha) package: its API may change in any release, without a major version bump.
# EncryptionAlgorithm

Encryption Algorithms used in AWS Elemental MediaConnect.

Obtainable from: EncryptionAlgorithm.AES128, EncryptionAlgorithm.AES192, EncryptionAlgorithm.AES256, EncryptionAlgorithm.of

- Stability: [Experimental](/cdk/api/stability.html)
- Source: [`lib/shared.ts`](https://github.com/aws/aws-cdk/blob/v2.277.0/packages/@aws-cdk/aws-mediaconnect-alpha/lib/shared.ts#L13)

## Example

TypeScript:

```ts
declare const stack: Stack;
declare const flow: Flow;
declare const role: iam.IRole;
declare const secret: secretsmanager.ISecret;

const entitlement = new FlowEntitlement(stack, 'MyEntitlement', {
  flow: flow,
  description: 'Grant partner access to live feed',
  subscribers: ['111122223333'],
  encryption: {
    role,
    secret,
    algorithm: EncryptionAlgorithm.AES256,
  },
});
```

Python:

```python
from aws_cdk.aws_mediaconnect_alpha import StaticKeyEncryption
# stack: Stack
# flow: Flow
# role: iam.IRole
# secret: secretsmanager.ISecret

entitlement = FlowEntitlement(stack, "MyEntitlement",
    flow=flow,
    description="Grant partner access to live feed",
    subscribers=["111122223333"],
    encryption=StaticKeyEncryption(
        role=role,
        secret=secret,
        algorithm=EncryptionAlgorithm.AES256
    )
)
```

Java:

```java
Stack stack;
Flow flow;
IRole role;
ISecret secret;

FlowEntitlement entitlement = FlowEntitlement.Builder.create(stack, "MyEntitlement")
        .flow(flow)
        .description("Grant partner access to live feed")
        .subscribers(List.of("111122223333"))
        .encryption(StaticKeyEncryption.builder()
                .role(role)
                .secret(secret)
                .algorithm(EncryptionAlgorithm.AES256)
                .build())
        .build();
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.AWS.MediaConnect.Alpha
Stack stack;
Flow flow;
IRole role;
ISecret secret;

var entitlement = new FlowEntitlement(stack, "MyEntitlement", new FlowEntitlementProps {
    Flow = flow,
    Description = "Grant partner access to live feed",
    Subscribers = new [] { "111122223333" },
    Encryption = new StaticKeyEncryption {
        Role = role,
        Secret = secret,
        Algorithm = EncryptionAlgorithm.AES256
    }
});
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awsmediaconnectalpha/v2
var stack Stack
var flow Flow
var role IRole
var secret ISecret

entitlement := awsmediaconnectalpha.NewFlowEntitlement(stack, jsii.String("MyEntitlement"), &FlowEntitlementProps{
	Flow: flow,
	Description: jsii.String("Grant partner access to live feed"),
	Subscribers: []*string{
		jsii.String("111122223333"),
	},
	Encryption: &StaticKeyEncryption{
		Role: *Role,
		Secret: *Secret,
		Algorithm: awsmediaconnectalpha.EncryptionAlgorithm_AES256(),
	},
})
```

## Properties

- `AES128`: [EncryptionAlgorithm](/cdk/api/v2/docs/@aws-cdk_aws-mediaconnect-alpha.EncryptionAlgorithm.html) (static) — Option for AES128.

- `AES192`: [EncryptionAlgorithm](/cdk/api/v2/docs/@aws-cdk_aws-mediaconnect-alpha.EncryptionAlgorithm.html) (static) — Option for AES192.

- `AES256`: [EncryptionAlgorithm](/cdk/api/v2/docs/@aws-cdk_aws-mediaconnect-alpha.EncryptionAlgorithm.html) (static) — Option for AES256.

- `value`: string — The encryption algorithm string value.

## Methods

- `of(value: string): EncryptionAlgorithm // chainable` (static) — Use a custom encryption algorithm value.

  **Parameters**

  - `value` — The encryption algorithm string value.

- `toString(): string` — Returns the string value.
