mirror of
https://github.com/danbulant/jose
synced 2026-05-22 22:09:14 +00:00
8 lines
273 B
JavaScript
8 lines
273 B
JavaScript
const { createSecretKey, KeyObject } = require('crypto')
|
|
|
|
if (KeyObject) {
|
|
module.exports = KeyObject
|
|
} else {
|
|
const SecretKeyObject = Object.getPrototypeOf(createSecretKey(Buffer.allocUnsafe(1)))
|
|
module.exports = Object.getPrototypeOf(SecretKeyObject).constructor
|
|
}
|