Comments (2)
@substack Thanks, I'll take a look. I'm using ed25519
via the elliptic
module, which provides utility functions such as creating a keypair object from text:
var key = JSON.parse(fs.readFileSync(config.key).toString())
return ed25519.keyPair({
priv: key.priv,
privEnc: 'hex',
pub: key.pub,
pubEnc: 'hex'
})
Is that possible with ed25519-supercop
too?
from gittorrent.
Instead of a keypair object, you get the buffers directly that you can pass to signing functions:
generate.js:
var ed = require('ed25519-supercop')
var kp = ed.createKeyPair(ed.createSeed())
console.log(JSON.stringify({
secretKey: kp.secretKey.toString('hex'),
publicKey: kp.publicKey.toString('hex')
}))
sign.js:
var ed = require('../')
var path = require('path')
var concat = require('concat-stream')
var kp = require(path.resolve(process.argv[2]))
process.stdin.pipe(concat(function (body) {
var sig = ed.sign(body, kp.publicKey, kp.secretKey)
console.log(sig.toString('hex'))
}))
$ node generate.js > keys.json
$ echo wow | node sign.js keys.json
d5b606ace3228afe5fbd63b03ce2f569999f32557b0c7cf5cad43195a43022d043de10c349c9dd7ba41f3ec1be6f205af629135566c711f933dce5937b677b0c
from gittorrent.
Related Issues (20)
- Bitcoin username registration
- Open to burning coins to an unspendable address? HOT 18
- Namecoin HOT 8
- How to integrate naming services with GitTorrent? HOT 3
- multi protocol handoff HOT 4
- Is this Project abandoned? HOT 26
- Registering the gittorrent: URL scheme
- Private Repos? HOT 2
- Clone hangs forever for self-hosted repo HOT 3
- Ethereum Registry HOT 3
- Possible collaboration with similar project (Gitchain) HOT 4
- Is the project active anymore? HOT 1
- Decouple GitTorrent from blockchain HOT 11
- Public Gittorrent repository as Github clone HOT 1
- Create pull-request at Git-SCM
- same user/repo ? HOT 1
- "WARN deprecated [email protected]" - Time to look closer at older depedencies? HOT 1
- Browser Compatibility
- other js compatibility
- what is the difference between GitTorrent, Gitpay, Gitchain, radicle, gitnonymous?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gittorrent.