forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add types for jsrsasign (DefinitelyTyped#37784)
- Loading branch information
1 parent
d1d0eff
commit 54712a7
Showing
105 changed files
with
7,605 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// Type definitions for jsrsasign 8.0 | ||
// Project: https://github.com/kjur/jsrsasign | ||
// Definitions by: Florian Keller <https://github.com/ffflorian> | ||
// Definitions: https://github.com/ffflorian/jsrsasign-types | ||
// TypeScript Version: 2.7 | ||
|
||
/// <reference path="./jsrsasign.d.ts" /> | ||
/// <reference path="./modules/BigInteger.d.ts" /> | ||
/// <reference path="./modules/ECCurveFp.d.ts" /> | ||
/// <reference path="./modules/ECFieldElementFp.d.ts" /> | ||
/// <reference path="./modules/ECPointFp.d.ts" /> | ||
/// <reference path="./modules/KEYUTIL.d.ts" /> | ||
/// <reference path="./modules/KJUR/index.d.ts" /> | ||
/// <reference path="./modules/RSAKey.d.ts" /> | ||
/// <reference path="./modules/X509.d.ts" /> | ||
|
||
export = jsrsasign; | ||
export as namespace jsrsasign; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { KJUR, KEYUTIL } from 'jsrsasign'; | ||
|
||
const ec = new KJUR.crypto.ECDSA({ curve: 'secp256r1' }); | ||
ec.generateKeyPairHex(); | ||
ec.getPublicKeyXYHex(); | ||
ec.parseSigHex('30...'); | ||
ec.parseSigHexInHexRS('30...'); | ||
|
||
KJUR.crypto.ECDSA.getName('2b8104000a'); | ||
|
||
new KJUR.asn1.cades.OtherHash('1234'); | ||
new KJUR.asn1.cades.OtherHash({ alg: 'sha256', hash: '1234' }); | ||
new KJUR.asn1.cades.OtherHash({ alg: 'sha256', cert: '' }); | ||
new KJUR.asn1.cades.OtherHash({ cert: '' }); | ||
|
||
new KJUR.asn1.x509.AuthorityKeyIdentifier({ | ||
critical: true, | ||
kid: { hex: '89ab' }, | ||
issuer: { str: '/C=US/CN=a' }, | ||
sn: { hex: '1234' }, | ||
}); | ||
|
||
KEYUTIL.getKey('pemPKCS1PrivateKey'); |
Oops, something went wrong.