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