Skip to content

Instantly share code, notes, and snippets.

@lang315
lang315 / encrypt.cs
Created December 6, 2023 02:53 — forked from huoshan12345/encrypt.cs
Instagram enc_password generator in C#
// Packages need to be installed:
// Sodium.Core
// System.Security.Cryptography.Algorithms
// The values of publicKey,keyId,version are from shared_data.
// You need to call https://www.instagram.com/data/shared_data/ to get shared_data first
public static string GenerateEncPassword(string password, string publicKey, string keyId, string version)
{
var time = DateTime.UtcNow.ToTimestamp(); // Unix timestamp
var keyBytes = publicKey.HexToBytes(); // Convert a hex string to a byte array
@lang315
lang315 / workerpool.go
Created December 27, 2019 15:13 — forked from linxGnu/workerpool.go
We will publish this code soon. This code is a worker pool power many products at LINE Corp. Please respect to the copyright.
// Copyright 2019 LINE Corporation
//
// LINE Corporation licenses this file to you 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
// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT