{"record":{"id":"6d3b59fcf574c39b","repo":"grafana/k6","slug":"not-implemented","errorCode":null,"errorMessage":"not implemented","messagePattern":"not implemented","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/js/modules/k6/webcrypto/subtle_crypto.go","lineNumber":1044,"sourceCode":"// The `key` parameter is the key to export, as a CryptoKey object.\n// The `wrappingKey` parameter is the key to use to encrypt the exported key. The key **must** have\n// the `wrapKey` usage flag set.\n// The `wrapAlgorithm` parameter identifies the algorithm to use to encrypt the exported key, and should be one of:\n//   - an `SubtleCrypto.RSAOaepParams` object\n//   - an `SubtleCrypto.AesCtrParams` object\n//   - an `SubtleCrypto.AesCbcParams` object\n//   - an `SubtleCrypto.AesGcmParams` object\n//   - for the AES-KW algorithm, pass the string \"AES-KW\", or an object of the form `{ name: \"AES-KW\" }`\n//\n//nolint:revive // remove the nolint directive when the method is implemented\nfunc (sc *SubtleCrypto) WrapKey(\n\tformat KeyFormat,\n\tkey sobek.Value,\n\twrappingKey sobek.Value,\n\twrapAlgorithm sobek.Value,\n) (*sobek.Promise, error) {\n\t// TODO: implementation\n\treturn nil, errors.New(\"not implemented\")\n}\n\n// UnwrapKey \"unwraps\" a key.\n//\n// This means that it takes as its input a key that has been exported and then\n// encrypted (also called \"wrapped\"). It decrypts the key and then imports it, returning\n// a `CryptoKey` object that can be used in the Web Crypto API.\n//\n// As with `SubtleCrypto.ImportKey`, you specify the key's import format and other attributes\n// of the key to import details such as whether it is extractable, and which operations it can be used for.\n//\n// But because `SubtleCrypto.UnwrapKey` also decrypts the key to be imported, you also need to pass\n// in the key that must be used to decrypt it. This is sometimes called the \"unwrapping key\".\n//\n// The inverse of `SubtleCrypto.UnwrapKey` is `SubtleCrypto.WrapKey`: while `SubtleCrypto.UnwrapKey` is composed\n// of decrypt + import, `Subtle.WrapKey` is composed of encrypt + export.\n//\n// It returns a Promise that fulfills with the unwrapped key as a CryptoKey object.","sourceCodeStart":1026,"sourceCodeEnd":1062,"githubUrl":"https://github.com/grafana/k6/blob/93accf6570dcd306ca5e99cc44c393ee3797761b/internal/js/modules/k6/webcrypto/subtle_crypto.go#L1026-L1062","documentation":"Error \"not implemented\" thrown in grafana/k6.","triggerScenarios":"Thrown at internal/js/modules/k6/webcrypto/subtle_crypto.go:1044 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"93accf6570dcd306ca5e99cc44c393ee3797761b","analyzedAt":"2026-08-15T21:23:27.118Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}