0.0.6 • Published 2 years ago

ssc-keys v0.0.6

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

ssc keys

Key operations for web browsers.

This uses the one-webcrypto API, so the WebCrypto API in a browser.

This is used to create keys that are visible as strings in a web browser, for use with ssc-server

install

npm i ssc-keys

example

import { create } from 'ssc-keys'

create().then(kp => {
    console.log('*kp*', kp)
    // =>
    // *kp* 
    // {
    //     "publicKey": "BPVcET2JN9HP3M3BaXGAtcZHDmKSrRjbSUXUFPjY+bS4wHesYEqKHIhKCx4mSQb4aZaA5eeRrK73SPWvIxqfXwY=",
    //     "privateKey": "MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgjBVEyaAeWR63att0e9guTZpPI9ptabkz+TUpntepf+qhRANCAAT1XBE9iTfRz9zNwWlxgLXGRw5ikq0Y20lF1BT42Pm0uMB3rGBKihyISgseJkkG+GmWgOXnkayu90j1ryMan18G"
    // }
})

Keys are created with this algorithm

// (algorithm, extractable, uses)
webcrypto.subtle.generateKey({
    name:   'ECDSA',
    namedCurve: 'P-256'
}, true, ['sign', 'verify'])
0.0.3

2 years ago

0.0.2

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.6

2 years ago

0.0.1

2 years ago

0.0.0

2 years ago