Skip to content

Instantly share code, notes, and snippets.

View jordanbtucker's full-sized avatar

Jordan Tucker jordanbtucker

View GitHub Profile
/**
* ThingWorx EncryptionServices.DecryptWithKey.
* @module thingworx-decrypt
* @author Jordan Tucker <jordanbtucker@gmail.com>
*/
var crypto = require('crypto')
/**
* Decrypts data encrypted using ThingWorx's EncryptionServices.EncryptWithKey
@jordanbtucker
jordanbtucker / test1.js
Last active March 9, 2017 07:23
odrive decrypt testing
// The following code attempts to decrypt a filename encrypted by odrive. It
// fails when attempting to remove PKCS#7 padding from the plaintext.
const crypto = require('crypto')
// The original filename is `test.txt`. It was encrypted with odrive using the
// following password.
const password = 'password123'
const filename = 'MaUi8C8YFNhN5dzbjNtqgXx3Cm-PwyUYxR1Rl4JauHHrjrTMo0k9poE='
# EditorConfig is awesome: http://EditorConfig.org
root = *
[*]
indent_style = tab
indent_size = 4
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
@jordanbtucker
jordanbtucker / settings.json
Last active April 5, 2017 01:13
VS Code Settings
// Place your settings in this file to overwrite the default settings
{
"editor.rulers": [
80
],
"editor.insertSpaces": false,
"editor.minimap.enabled": true,
"editor.renderWhitespace": "boundary",
"workbench.welcome.enabled": false,
"window.reopenFolders": "none",
// Endpoint info excluded.
TcpClient client = new TcpClient();
var stream = client.GetStream();
// Assume pre-shared keys are used and set at this point.
AesManaged aes = new AesManaged();
var aesEncryptor = aes.CreateEncryptor();
CryptoStream aesStream = new CryptoStream(
stream, aesEncryptor, CryptoStreamMode.Write);
var JSON5 =
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId]) {
@jordanbtucker
jordanbtucker / index.d.ts
Created April 5, 2019 05:09
@types/feathersjs__feathers using `export =` instead of `export default`
// Type definitions for @feathersjs/feathers 3.1
// Project: http://feathersjs.com/
// Definitions by: Jan Lohage <https://github.com/j2L4e>
// Abraao Alves <https://github.com/AbraaoAlves>
// Tim Mensch <https://github.com/TimMensch>
// Definitions: https://github.com/feathersjs-ecosystem/feathers-typescript
// TypeScript Version: 2.3
/// <reference types="node" />

Keybase proof

I hereby claim:

  • I am jordanbtucker on github.
  • I am jordanbtucker (https://keybase.io/jordanbtucker) on keybase.
  • I have a public key whose fingerprint is 4276 5DD0 DA7A 832C A48A 5ADB 12B0 D328 B7B6 541D

To claim this, I am signing this object:

#include "pch.h"
#include <windows.h>
#include <bthsdpdef.h>
#include <bthdef.h>
#include <BluetoothAPIs.h>
#include <strsafe.h>
#include <tchar.h>
#pragma comment(lib, "Bthprops.lib")
Date
= FourDigits '-' TwoDigits '-' TwoDigits 'T' TwoDigits ':' TwoDigits ':' TwoDigits { return new Date(text()) }
FourDigits
= Digit Digit Digit Digit
TwoDigits
= Digit Digit
Digit