Skip to content

Instantly share code, notes, and snippets.

View BravoTango86's full-sized avatar

BravoTango86 BravoTango86

View GitHub Profile
@BravoTango86
BravoTango86 / WebPushHelper.cs
Created September 20, 2016 21:50
Encrypting Data for Web Browser Push API Notifications
/*
* Built for .NET Core 1.0 on Windows 10 with Portable.BouncyCastle v1.8.1.1
*
* Tested on Chrome v53.0.2785.113 m (64-bit) and Firefox 48.0.2
*
* Massive thanks to Peter Beverloo for the following:
* https://docs.google.com/document/d/1_kWRLJHRYN0KH73WipFyfIXI1UzZ5IyOYSs-y_mLxEE/
* https://tests.peter.sh/push-encryption-verifier/
*
* Some more useful links:
@BravoTango86
BravoTango86 / SntpClient.cs
Created September 20, 2016 21:51
C# SNTP Client based on android.net.SntpClient
/*
* Derived from https://android.googlesource.com/platform/frameworks/base/+/master/core/java/android/net/SntpClient.java
*
* Copyright (C) 2016 BravoTango86
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
@BravoTango86
BravoTango86 / BarcodeGenerator.cs
Created September 20, 2016 21:52
Barcode Generation in C# using ZXing for .NET Core and ImageProcessorCore
/*
* Copyright (C) 2016 BravoTango86
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@BravoTango86
BravoTango86 / OtpAuthenticator.cs
Created September 20, 2016 21:53
C# OTP Implementation with TOTP and HOTP
/*
* Copyright (C) 2016 BravoTango86
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@BravoTango86
BravoTango86 / Base32.cs
Created September 20, 2016 22:03
Base32 Encoding and Decoding in C#
/*
* Derived from https://github.com/google/google-authenticator-android/blob/master/AuthenticatorApp/src/main/java/com/google/android/apps/authenticator/Base32String.java
*
* Copyright (C) 2016 BravoTango86
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
@BravoTango86
BravoTango86 / SntpClient.cs
Created September 20, 2016 22:04
C# SNTP Client based on android.net.SntpClient
/*
* Derived from https://android.googlesource.com/platform/frameworks/base/+/master/core/java/android/net/SntpClient.java
*
* Copyright (C) 2016 BravoTango86
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0