added ability to add keys as base 64

This commit is contained in:
2016-06-14 00:11:20 +02:00
parent 967c9fd9d1
commit e5bdfff743
10 changed files with 25 additions and 12 deletions

View File

@ -45,10 +45,18 @@ export class SshKey {
set privateKey(privateKeyArg:string){
this.privKey = privateKeyArg;
};
// setters
set privateKeyBase64(privateKeyArg:string) {
this.privKey = plugins.base64.decode(privateKeyArg);
}
set publicKey(publicKeyArg:string){
this.pubKey = publicKeyArg;
};
set publicKeyBase64(publicKeyArg:string) {
this.pubKey = plugins.base64.decode(publicKeyArg);
}
store(filePathArg?:string){
let filePathObj = plugins.path.parse(filePathArg);