Package Exports
- v-crypto-test
- v-crypto-test/dist/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (v-crypto-test) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
v-crypto-test
A TypeScript library providing cryptographic utilities for various cryptographic operations.
Installation
npm install v-crypto-test
# or
yarn add v-crypto-testFeatures
- BIP39: Mnemonic generation and handling
- HMAC: Keyed-Hash Message Authentication Code
- Keccak: Keccak-256 hashing
- Libsodium: Ed25519, Argon2id, XChaCha20-Poly1305
- PBKDF2: Password-Based Key Derivation
- Random: Secure random number generation
- RIPEMD: RIPEMD-160 hashing
- Secp256k1: Elliptic curve cryptography
- SHA: SHA-256 and SHA-512 hashing
- SLIP10: Hierarchical deterministic key generation
Usage
import {
Bip39,
Hmac,
Keccak256,
Ed25519,
Random,
Secp256k1,
Sha256
} from 'v-crypto-test';
// Generate a random mnemonic
const mnemonic = Bip39.generateMnemonic(Random.getBytes);
// Create a SHA-256 hash
const hash = new Sha256(new Uint8Array([1, 2, 3, 4])).digest();
// Generate a Secp256k1 keypair
const keypair = await Secp256k1.makeKeypair(Random.getBytes);
// Sign a message with Ed25519
const ed25519Keypair = await Ed25519.makeKeypair(Random.getBytes);
const signature = await Ed25519.createSignature(message, ed25519Keypair);
const isValid = await Ed25519.verifySignature(signature, message, ed25519Keypair.pubkey);Dependencies
- @noble/hashes: ^1.0.0
- elliptic: ^6.6.1
- libsodium-wrappers-sumo: ^0.7.15
- v-encoding-test: ^1.0.0
- v-math-test: ^1.0.0
- v-utils-test: ^1.0.0
License
ISC