This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getKey(identifier) { | |
var chars = '0123456789ABCDEFGHJKLMNPQRTUVWXY', | |
hash = CryptoJS.MD5(identifier).toString().toUpperCase(), | |
parts = []; | |
for (var i = 0; i < 32; i += 2) { | |
var nextDigit = parseInt(hash.substr(i, 2), 16) & 31, | |
withDash = (((i % 8) == 0) && (i > 0)); | |
parts.push(withDash ? '-' : ''); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class MbamGen { | |
public function get_key() { | |
$data = [ | |
'id' => $this->random_char() . $this->random_char() . $this->random_char() . $this->random_char() . $this->random_char(), | |
'key' => '' | |
]; | |
$hash = strtoupper(md5($data['id'])); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Linq; | |
using System.Security.Cryptography; | |
using System.Web; | |
namespace GAuthWrapper | |
{ | |
public static class GAuthProvider | |
{ | |
public static int CodeLength { get; set; } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Numerics; | |
using System.Runtime.Serialization; | |
using System.Security.Cryptography; | |
using System.Xml.Serialization; | |
using Org.BouncyCastle.Asn1.Sec; | |
namespace BitcoinTools |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Reflection; | |
using Microsoft.Win32; | |
/// <summary> | |
/// Stores and accesses user preferences between sessions. | |
/// </summary> | |
public static class UserPrefs | |
{ | |
private static readonly RegistryKey MainKey; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Specialized; | |
using System.IO; | |
using System.Net; | |
using System.Runtime.Serialization; | |
using System.Runtime.Serialization.Json; | |
using System.Text; | |
namespace PasteSx | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Security.Cryptography; | |
public static class Aes | |
{ | |
public static byte[] Encrypt(byte[] data, byte[] key) | |
{ | |
if (data == null) | |
throw new ArgumentNullException("data"); | |
if (key == null) | |
throw new ArgumentNullException("key"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.CodeDom.Compiler; | |
using System.Collections.Generic; | |
using System.Resources; | |
using System.Text; | |
using Microsoft.CSharp; | |
using Microsoft.VisualBasic; | |
namespace PCompile | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Imports System.Runtime.Serialization.Json | |
Imports System.IO | |
Imports System.Text | |
Public Class JsonUtil | |
''' <summary> | |
''' Serializes an object to the respectable JSON string. | |
''' </summary> | |
Public Shared Function Serialize(Of T)(o As T) As String | |
Dim s = New DataContractJsonSerializer(GetType(T)) |