Skip to content

Instantly share code, notes, and snippets.

View matthewphewes's full-sized avatar

Matthew Hewes matthewphewes

  • San Francisco, California
View GitHub Profile
@matthewphewes
matthewphewes / social.js
Last active September 7, 2015 20:25 — forked from rampicos/social.js
Social.js is the Appcelerator Titanium's Alloy Widget at first it is used to connect with Twitter only, though twitter and linkedin uses OAuth for its authentication I made some changes on Social.js for multi-purpose to connect Twitter and LinkedIn
function hex_sha1(s) {
return binb2hex(core_sha1(str2binb(s), s.length * chrsz));
}
function b64_sha1(s) {
return binb2b64(core_sha1(str2binb(s), s.length * chrsz));
}
function str_sha1(s) {
return binb2str(core_sha1(str2binb(s), s.length * chrsz));