RSAHashedKeyGenParams
Caution
The experimental module
k6/experimental/webcrypto
has graduated, and its functionality is now available globally through thecrypto
object. Thek6/experimental/webcrypto
is deprecated and will be removed in the near future.To migrate your scripts, remove the
k6/experimental/webcrypto
imports and use thecrypto
object instead.
The RSAHashedKeyGenParams
object represents the object that should be passed as the algorithm parameter into the generateKey operation when generating an RSA key pair.
Properties
Example
import { crypto } from 'k6/experimental/webcrypto';
export default async function () {
const keyPair = await crypto.subtle.generateKey(
{
name: 'RSA-PSS',
modulusLength: 2048,
publicExponent: new Uint8Array([1, 0, 1]),
hash: { name: 'SHA-256' },
},
true,
['sign', 'verify']
);
}