Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
72a696908a | |||
f3d63e027f |
2
package-lock.json
generated
2
package-lock.json
generated
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@pushrocks/smartcrypto",
|
||||
"version": "1.0.6",
|
||||
"version": "1.0.7",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@pushrocks/smartcrypto",
|
||||
"version": "1.0.6",
|
||||
"version": "1.0.7",
|
||||
"private": false,
|
||||
"description": "easy crypto methods",
|
||||
"main": "dist/index.js",
|
||||
|
@ -7,6 +7,10 @@ export class PrivateKey {
|
||||
return new PrivateKey(privateKey);
|
||||
}
|
||||
|
||||
public static fromPemString(pemString: string) {
|
||||
return new PrivateKey(plugins.nodeForge.pki.privateKeyFromPem(pemString));
|
||||
}
|
||||
|
||||
// INSTANCE
|
||||
public forgePrivateKey: plugins.nodeForge.pki.PrivateKey;
|
||||
|
||||
|
@ -7,6 +7,10 @@ export class PublicKey {
|
||||
return new PublicKey(privateKey);
|
||||
}
|
||||
|
||||
public static fromPemString(pemString: string) {
|
||||
return new PublicKey(plugins.nodeForge.pki.publicKeyFromPem(pemString));
|
||||
}
|
||||
|
||||
// INSTANCE
|
||||
public forgePublicKey: plugins.nodeForge.pki.PublicKey;
|
||||
|
||||
|
Reference in New Issue
Block a user