Skip to content

Instantly share code, notes, and snippets.

@eliburke
eliburke / gist:24f06a1590d572e86a01504e1b38b27f
Last active February 4, 2022 05:11
Encrypt/Decrypt functions for AES 256 GCM using OpenSSL for iPhone
// This is 4 year old code, and I have long since switched to PolarSSL
// But I have no reason to believe it is not still valid and functional
#include <openssl/rand.h>
#include <openssl/ecdsa.h>
#include <openssl/obj_mac.h>
#include <openssl/err.h>
#include <openssl/pem.h>
#include <openssl/evp.h>
@eliburke
eliburke / NSUUID+uuid5.h
Created May 1, 2015 17:55
iOS NSUUID category for calculating an RFC4122 compliant uuid5. Tested / compatible with python's uuid.uuid5
//
// NSUUID+uuid5.h
//
// MIT License (aka, do with it what you want)
//
// Copyright (c) 2015 Eli Burke eburke@pobox.com
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software
// and associated documentation files (the "Software"), to deal in the Software without restriction,
// including without limitation the rights to use, copy, modify, merge, publish, distribute,