Skip to content

Instantly share code, notes, and snippets.

Avatar

BravoTango86 BravoTango86

  • London, UK
View GitHub Profile
@BravoTango86
BravoTango86 / SntpClient.cs
Created Sep 20, 2016
C# SNTP Client based on android.net.SntpClient
View SntpClient.cs
/*
* 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 / Base32.cs
Created Sep 20, 2016
Base32 Encoding and Decoding in C#
View Base32.cs
/*
* 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 / OtpAuthenticator.cs
Created Sep 20, 2016
C# OTP Implementation with TOTP and HOTP
View OtpAuthenticator.cs
/*
* 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 / BarcodeGenerator.cs
Created Sep 20, 2016
Barcode Generation in C# using ZXing for .NET Core and ImageProcessorCore
View BarcodeGenerator.cs
/*
* 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 / SntpClient.cs
Created Sep 20, 2016
C# SNTP Client based on android.net.SntpClient
View SntpClient.cs
/*
* 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 / WebPushHelper.cs
Created Sep 20, 2016
Encrypting Data for Web Browser Push API Notifications
View WebPushHelper.cs
/*
* 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: