![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Private Key, Public Key, Signature, AES, Encryption / Decryption
import ecc from 'ttmcjs-ecc'
// or
const ecc = require('ttmcjs-ecc')
npm install ttmcjs-ecc
<html>
<head>
<meta charset="utf-8">
<!--
sha512-cL+IQQaQ586s9DrXfGtDheRpj5iDKh2M+xlpfwbhNjRIp4BGQ1fkM/vB4Ta8mc+f51YBW9sJiPcyMDIreJe6gQ== lib/eosjs-ecc.js
sha512-dYFDmK/d9r3/NCp6toLtfkwOjSMRBaEzaGAx1tfRItC0nsI0hVLERk05iNBQR7uDNI7ludYhcBI4vUiFHdjsTQ== lib/eosjs-ecc.min.js
sha512-eq1SCoSe38uR1UVuQMwR73VgY8qKTBDc87n2nIiC5WLhn1o2y1U6c5wY8lrigVX7INM8fM0PxDlMX5WvpghKig== lib/eosjs-ecc.min.js.map
-->
<script src="https://cdn.jsdelivr.net/npm/eosjs-ecc@4.0.4/lib/eosjs-ecc.min.js"
integrity="sha512-dYFDmK/d9r3/NCp6toLtfkwOjSMRBaEzaGAx1tfRItC0nsI0hVLERk05iNBQR7uDNI7ludYhcBI4vUiFHdjsTQ=="
crossorigin="anonymous"></script>
</head>
<body>
See console object: ttmcjs_ecc
</body>
</html>
Type: string
Initialize by running some self-checking code. This should take a second to gather additional CPU entropy used during private key generation.
Initialization happens once even if called multiple times.
Returns Promise
Does not pause to gather CPU entropy.
Returns Promise<PrivateKey> test key
cpuEntropyBits
number gather additional entropy
from a CPU mining algorithm. This will already happen once by
default. (optional, default 0
)ecc.randomKey().then(privateKey => {
console.log('Private Key:\t', privateKey) // wif
console.log('Public Key:\t', ecc.privateToPublic(privateKey)) // TTMCkey...
})
seed
string any length string. This is private. The same
seed produces the same private key every time. At least 128 random
bits should be used to produce a good private key.ecc.seedPrivate('secret') === wif
Returns wif
ecc.privateToPublic(wif) === pubkey
Returns pubkey
ecc.isValidPublic(pubkey) === true
Returns boolean valid
wif
wifecc.isValidPrivate(wif) === true
Returns boolean valid
Create a signature using data or a hash.
data
(string | Buffer)privateKey
(wif | PrivateKey)encoding
String data encoding (if string) (optional, default 'utf8'
)ecc.sign('I am alive', wif)
Returns string string signature
dataSha256
(String | Buffer) sha256 hash 32 byte buffer or stringprivateKey
(wif | PrivateKey)encoding
String dataSha256 encoding (if string) (optional, default 'hex'
)Returns string string signature
Verify signed data.
signature
(string | Buffer) buffer or hex stringdata
(string | Buffer)pubkey
(pubkey | PublicKey)encoding
(optional, default 'utf8'
)hashData
boolean sha256 hash data before verify (optional, default true
)ecc.verify(signature, 'I am alive', pubkey) === true
Returns boolean
Recover the public key used to create the signature.
signature
(String | Buffer) (TTMCbase58sig.., Hex, Buffer)data
(String | Buffer) full dataencoding
String data encoding (if data is a string) (optional, default 'utf8'
)ecc.recover(signature, 'I am alive') === pubkey
Returns pubkey
signature
(String | Buffer) (TTMCbase58sig.., Hex, Buffer)dataSha256
(String | Buffer) sha256 hash 32 byte buffer or hex stringencoding
String dataSha256 encoding (if dataSha256 is a string) (optional, default 'hex'
)Returns PublicKey
data
(string | Buffer) always binary, you may need Buffer.from(data, 'hex')resultEncoding
(optional, default 'hex'
)encoding
string result encoding 'hex', 'binary' or 'base64' (optional, default 'hex'
)ecc.sha256('hashme') === '02208b..'
ecc.sha256(Buffer.from('02208b', 'hex')) === '29a23..'
Returns (string | Buffer) Buffer when encoding is null, or string
TTMCKey..
Type: string
let {PrivateKey, PublicKey, Signature, Aes, key_utils, config} = require('ttmcjs-ecc')
// Create a new random private key
let privateWif
PrivateKey.randomKey().then(privateKey => privateWif = privateKey.toWif())
// Convert to a public key
pubkey = PrivateKey.fromString(privateWif).toPublic().toString()
git clone https://github.com/vankiaio/vktjs-ecc.git
cd ttmcjs-ecc
npm install
npm run build_browser
# builds: ./dist/eosjs-ecc.js
# Verify release hash
<script src=eosjs-ecc.js></script>
var ecc = eosjs_ecc
ecc.randomKey().then(privateWif => {
var pubkey = ecc.privateToPublic(privateWif)
console.log(pubkey)
})
FAQs
Elliptic curve cryptography functions
The npm package ttmcjs-ecc receives a total of 0 weekly downloads. As such, ttmcjs-ecc popularity was classified as not popular.
We found that ttmcjs-ecc demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.