new KeyPair(privateKey, publicKey) → {object}
KeyPair is used to hold public and private key
Parameters:
Name | Type | Argument | Description |
---|---|---|---|
privateKey |
String | function | the private key | |
publicKey |
String |
<optional> |
the private key |
- Source:
Returns:
keyPair - the holder
- Type
- object
Example
// Create a AeroGear.KeyPair Object
var agCrypto = AeroGear.Crypto();
var keyPair = new agCrypto.KeyPair(privateKey, publicKey);
//or generate a keyPair
agCrypto.KeyPair(function(result) { ... });