Skip to content

Instantly share code, notes, and snippets.

View jamsidedown's full-sized avatar

Rob Anderson jamsidedown

View GitHub Profile
using System.Security.Cryptography;
var s = "2 4 6 9 5 2 3 1 2 4 5 4 4 8 2 2 3 1 3 2 2 6 14 2 0 4 13 9 4 11 6 4 10 6 2 2 5 7 0 1 4 1 6 1 0 3 1 0 5 6 3 6";
var ints = s.Split(' ').Select(uint.Parse).ToArray();
var iv = Encoding.UTF8.GetBytes("opencastsoftware");
WriteLine($"IV: {Convert.ToBase64String(iv)}");
var key = UInt128.Zero;
@jamsidedown
jamsidedown / cloudfront-template.yaml
Last active June 9, 2023 08:38
A CloudFormation template for deploying a serverless websocket API on AWS with a CloudFront function to convert path parameters to query string parameters
AWSTemplateFormatVersion: "2010-09-09"
Transform: "AWS::Serverless-2016-10-31"
Resources:
ApiGateway:
Type: "AWS::ApiGatewayV2::Api"
Properties:
Name: !Sub "${AWS::StackName}-wss-api"
ProtocolType: "WEBSOCKET"
RouteSelectionExpression: "\\$default"