Skip to content

Instantly share code, notes, and snippets.

View ibrahimlawal's full-sized avatar

Ibrahim Lawal ibrahimlawal

View GitHub Profile
@ibrahimlawal
ibrahimlawal / HibeeRSA.h
Last active December 18, 2020 20:24
An Objective-C class that provides RSA encryption using SecKeyEncrypt on Mac10.7 and iPhone2.0 Remember to change the sample key to the base64 encoded string of your public key.
//
// HibeeRSA.h
//
// Created by Ibrahim Lawal (ibrahim@lawal.me) on Feb/27/2016.
//
#import <Foundation/Foundation.h>
@interface HibeeRSA : NSObject
+ (nullable NSString *)encryptRSA:(nonnull NSString *)plainTextString;
@ibrahimlawal
ibrahimlawal / Crypto.java
Created March 1, 2016 14:53
A java 1.6 ccompatible class that provides RSA encryption using a base64 encoded public key string.
/**
* A java 1.6 ccompatible class that provides RSA encryption using a
* base64 encoded public key string.
*
* To encrypt, do
* Crypto.encrypt("Text to encrypt"); // returns base64 encoded string for encrypted data
*
* @author Ibrahim Lawal (ibrahim@lawal.me)
* @version 2016/02/29
*/
<?php
class HttpException extends \Exception
{
/**
* List of additional headers
*
* @var array
*/
private $headers = array();