It happens that there are many standards for storing cryptography materials (key, certificate, ...) and it isn't always obvious to know which standard is used by just looking at file name extension or file content. There are bunch of questions on stackoverflow asking about how to convert from PEM to PKCS#8 or PKCS#12, while many tried to answer the questions, those answers may not help because the correct answer depends on the content inside the PEM file. That is, a PEM file can contain many different things, such as an X509 certificate, a PKCS#1 or PKCS#8 private key. The worst-case scenario is that someone just store a non-PEM content in "something.pem" file.
This file contains 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
#!/bin/sh | |
# Based on https://github.com/patrodyne/patrodyne-scripts/tree/master/flac2mp3 | |
# Modified by aksh1618 | |
# PatroDyne: Patron Supported Dynamic Executables, http://patrodyne.org | |
# MIT license: https://raw.githubusercontent.com/patrodyne/patrodyne-scripts/master/LICENSE | |
# | |
# flac2mp3.sh - Linux script to convert FLAC audio files to MP3 files. | |
# | |
# Usage: | |
# |
This file contains 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
# @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() |
This file contains 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
/* | |
OTA update over HTTPS | |
As an example, we download and install ESP8266Basic firmware from github. | |
Requires latest git version of the core (November 17, 2015) | |
Created by Ivan Grokhotkov, 2015. | |
This example is in public domain. | |
*/ |
This file contains 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
# Why? | |
# To paste text into windows that normally don't allow it or have access to the clipboard. | |
# Examples: Virtual machines that do not yet have tools installed, websites that hijack paste | |
# | |
# Extended vs Simple? | |
# * Includes an initial delay to allow you to change active windows | |
# * Adds small delay between keypresses for slower responding windows like SSH sessions | |
# * Better handling of numbers | |
# * VMWare bug fix | |
# |