Skip to content

Instantly share code, notes, and snippets.

@zuazo
zuazo / gcm_core_aead_gem_compat.rb
Created June 18, 2014 22:00
Checks aead gem compatibility with OpenSSL core in ruby >= 2
# Requires Ruby >= 2
require "openssl"
require "aead"
key = Digest::SHA256.digest("key") # digest_length 32
algorithm = "aes-256-gcm"
data = "plaintext data"
auth_data = "authentication data"
import os
import os.path
import sys
from carbon.hashing import ConsistentHashRing
from carbon.conf import settings
## Settings
# Absolute path to the Graphite Data Directory
DATA_DIR = '/data/graphite/whisper'