keypair: minor.
This commit is contained in:
parent
7ec21588ac
commit
f8c3f37f0c
@ -291,7 +291,9 @@ KeyPair.prototype.fromSecret = function fromSecret(secret) {
|
|||||||
* @returns {KeyPair}
|
* @returns {KeyPair}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
KeyPair.fromRaw = function fromRaw(data) {
|
KeyPair.fromRaw = function fromRaw(data, enc) {
|
||||||
|
if (typeof data === 'string')
|
||||||
|
data = new Buffer(data, enc);
|
||||||
return new KeyPair().fromRaw(data);
|
return new KeyPair().fromRaw(data);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user