Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
looking for contributors for sovereign!

Sven Neuhaus neuhaus

💭
looking for contributors for sovereign!
  • Dortmund, Germany
View GitHub Profile
View New-cPassword.ps1
# @OneLogicalMyth
function New-cPassword($unencryptedString) {
# encrypt string to known AES key used by cPassword
$AesObject = New-Object System.Security.Cryptography.AesCryptoServiceProvider
$AesObject.Mode = [System.Security.Cryptography.CipherMode]::CBC
$AesObject.IV = New-Object Byte[]($AesObject.IV.Length)
$AesObject.KeySize = 256
$AesObject.Key = @(0x4e,0x99,0x06,0xe8,0xfc,0xb6,0x6c,0xc9,0xfa,0xf4,0x93,0x10,0x62,0x0f,0xfe,0xe8,
0xf4,0x96,0xe8,0x06,0xcc,0x05,0x79,0x90,0x20,0x9b,0x09,0xa4,0x33,0xb6,0x6c,0x1b)
$encryptor = $AesObject.CreateEncryptor()
@neuhaus
neuhaus / sign-offline.js
Last active May 12, 2020
Ethereum: Sign an offline transaction with Node and web3
View sign-offline.js
#!/usr/bin/env node
'use strict';
// ethereum: generate signed transactions
const fs = require('fs-extra');
const rls = require('readline-sync');
const Accounts = require('web3-eth-accounts');
const web3utils = require('web3-utils');
const accounts = new Accounts();