To compile the driver, you need to have make and a compiler installed. In addition, you must have the kernel headers installed.
Determine what kernel version you're running.
uname -r 3.18.7+
<link rel="import" href="../topeka-elements/category-images.html"> | |
<link rel="import" href="../core-icon/core-icon.html"> | |
<link rel="import" href="../core-icons/core-icons.html"> | |
<link rel="import" href="../core-icons/av-icons.html"> | |
<link rel="import" href="../paper-fab/paper-fab.html"> | |
<polymer-element name="my-element"> | |
<template> | |
<style> |
// Part of https://github.com/chris-rock/node-crypto-examples | |
// Nodejs encryption with CTR | |
var crypto = require('crypto'), | |
algorithm = 'aes-256-ctr', | |
password = 'd6F3Efeq'; | |
function encrypt(text){ | |
var cipher = crypto.createCipher(algorithm,password) | |
var crypted = cipher.update(text,'utf8','hex') |
<?php | |
use Aws\Kms\KmsClient; | |
// Somewhere in the controller or model | |
$this->load->config('aws'); | |
// Not needed for EC2 instance role based authorization - for my local instance only | |
$key = $this->config->item('aws_s3_access_key'); | |
$secret = $this->config->item('aws_s3_secret_key'); |
<?php | |
// These are just the basics for how to do this. Notes: | |
// - Not fully tested. | |
// - Not suitable for production. | |
// - May not work well if large ammounts of data. | |
// - Requires AWS SDK for PHP and http://php.net/manual/en/book.zip.php | |
require '/path/to/sdk-or-autoloader'; |
<?php | |
/** @var \Illuminate\Filesystem\FilesystemAdapter $fs */ | |
$fs = \Storage::disk('object_storage'); | |
/** @var \League\Flysystem\Filesystem $driver */ | |
$driver = $fs->getDriver(); | |
/** @var \League\Flysystem\AwsS3v3\AwsS3Adapter $adapter */ | |
$adapter = $driver->getAdapter(); |
// Code to encrypt data in sequelize fields | |
// We are using ascii85 as a way save on storage. Also, note that | |
// the space delimiter we are using is a bit of an abuse since in | |
// normal cases ascii85 will skip over it, but since we are using | |
// after encoding and before encoding, it shouldn't be an issue. | |
// | |
// Fields are broken down to facilitate unit testing. | |
// | |
// based on code here: http://vancelucas.com/blog/stronger-encryption-and-decryption-in-node-js/ |
### Keybase proof | |
I hereby claim: | |
* I am arizawan on github. | |
* I am arizawan (https://keybase.io/arizawan) on keybase. | |
* I have a public key ASC3LqLAQLyUo7sG032Vec7eQxB9IVqhagAm2qE5pETxGQo | |
To claim this, I am signing this object: |
{ | |
"default":"Etc/UTC", | |
"options":{ | |
"Africa/Abidjan":"Africa/Abidjan", | |
"Africa/Accra":"Africa/Accra", | |
"Africa/Algiers":"Africa/Algiers", | |
"Africa/Bissau":"Africa/Bissau", | |
"Africa/Cairo":"Africa/Cairo", | |
"Africa/Casablanca":"Africa/Casablanca", | |
"Africa/Ceuta":"Africa/Ceuta", |