Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 uid=33(www-data) gid=33(www-data) groups=33(www-data) Safe-mode: OFF (not secure) /var/www/html/sync/node_modules/jose/dist/node/esm/runtime/ drwxr-xr-x | |
| Viewing file: Select action/file-type: import { KeyObject, createSecretKey } from 'crypto';
import { isCryptoKey } from './webcrypto.js';
import { checkSigCryptoKey } from '../lib/crypto_key.js';
import invalidKeyInput from '../lib/invalid_key_input.js';
import { types } from './is_key_like.js';
export default function getSignVerifyKey(alg, key, usage) {
if (key instanceof Uint8Array) {
if (!alg.startsWith('HS')) {
throw new TypeError(invalidKeyInput(key, ...types));
}
return createSecretKey(key);
}
if (key instanceof KeyObject) {
return key;
}
if (isCryptoKey(key)) {
checkSigCryptoKey(key, alg, usage);
return KeyObject.from(key);
}
throw new TypeError(invalidKeyInput(key, ...types, 'Uint8Array'));
}
|
:: Command execute :: | |
--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0402 ]-- |