Skip to content

Instantly share code, notes, and snippets.

@feedhenry-gists
feedhenry-gists / gist:1019176
Created June 10, 2011 16:13
Security Save A Key
$fh.sec({
act:'savekey',
params:
{keytype:'public|private|secret|modulu',
key:'<key value>',
__cuid:'<optional-client unique device id>',
__session_id:'<optional-session id for the key>'}
});
@feedhenry-gists
feedhenry-gists / gist:1019164
Created June 10, 2011 16:07
Security Data Decryption Response
{
plaintext: '<decrypted data in plain text>'
}
@feedhenry-gists
feedhenry-gists / gist:1019163
Created June 10, 2011 16:06
Security Data Decryption
$fh.sec({
act:'decrypt',
params:
{algorithm:'RSA|AES',
ciphertext:'<data to decrypt>',
key: '<private key hex value for RSA decryption or secret key hex value for AES decryption>',
modulu: '<hex value of the modulu for RSA decryption>'
}
})
@feedhenry-gists
feedhenry-gists / gist:1019162
Created June 10, 2011 16:05
Security Data Encryption Response
{
ciphertext: '<hex value of the encrypted data>'
}
@feedhenry-gists
feedhenry-gists / gist:1019161
Created June 10, 2011 16:04
Security Data Encryption
$fh.sec({
act:'encrypt',
params:
{algorithm:'RSA|AES',
plaintext:'<data to encrypt>',
key: '<public key hex value for RSA encryption or secret key hex value for AES encryption>',
modulu: '<hex value of the modulu for RSA encryption>'
}
})
@feedhenry-gists
feedhenry-gists / gist:1019159
Created June 10, 2011 16:03
Security Hashing Response Object
{
hashvalue:"<The hash value of the input text>"
}
@feedhenry-gists
feedhenry-gists / gist:1019148
Created June 10, 2011 16:02
Security Hashing
$fh.sec({
act:'hash',
params:
{algorithm:'MD5|SHA1',
text:'<Input text for hashing>'}
});
@feedhenry-gists
feedhenry-gists / gist:1019127
Created June 10, 2011 15:54
Security Response AES Key
{
algorithm:'AES',
secretkey:'<hex value of the secret key>'
}
@feedhenry-gists
feedhenry-gists / gist:1019122
Created June 10, 2011 15:51
Security Response RSA Key
{
algorithm:'RSA',
publickey:'<hex value of the public key>',
privatekey: '<hex value of the private key>',
modulu:'<hex value of the modulu>'
}
@feedhenry-gists
feedhenry-gists / gist:1019117
Created June 10, 2011 15:51
Security Key generation
$fh.sec({
act:'keygen',
params:
{algorithm:'RSA|AES',
keysize:'1024|128'}
});