mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-20 14:56:19 -04:00
added funding credit UKRI DSbD
This commit is contained in:
parent
ba9127c9c8
commit
557d0b7567
4 changed files with 25 additions and 15 deletions
|
@ -1,5 +1,7 @@
|
|||
/**
|
||||
* @author Configured Things Ltd. [getconfigured@configuredthings.com]
|
||||
* @file Developed by {@link https://configuredthings.com Configured Things} with funding from the {@link https://www.ukri.org UKRI}
|
||||
* {@link https://www.dsbd.tech Digital Security by Design} program.
|
||||
* @author Configured Things Ltd. <getconfigured@configuredthings.com>
|
||||
* @copyright Crown Copyright 2025
|
||||
* @license Apache-2.0
|
||||
*/
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
/**
|
||||
* @author Configured Things Ltd. [getconfigured@configuredthings.com]
|
||||
* @file Developed by {@link https://configuredthings.com Configured Things} with funding from the {@link https://www.ukri.org UKRI}
|
||||
* {@link https://www.dsbd.tech Digital Security by Design} program.
|
||||
* @author Configured Things Ltd. <getconfigured@configuredthings.com>
|
||||
* @copyright Crown Copyright 2025
|
||||
* @license Apache-2.0
|
||||
*/
|
||||
|
@ -210,6 +212,7 @@ let instance, dataview;
|
|||
/**
|
||||
* Helper function to reserve space in the buffer used
|
||||
* as a stack between js and the wasm.
|
||||
* @private
|
||||
* @param {Object} offset - Must be an an object so we can update it's value
|
||||
* @param {number} offset.value
|
||||
* @param {number} length
|
||||
|
@ -231,21 +234,22 @@ function reserve(offset, length) {
|
|||
}
|
||||
|
||||
/**
|
||||
* A signed JSON object.
|
||||
* @typedef {Object} SignedJSON
|
||||
* An object containing the signature, the ArrayBuffer used to generate the signature, and the signing operation's context
|
||||
* @typedef {Object} SignedObject
|
||||
* @property {Uint8Array} context - A buffer representing the context used to define the context of the signing operation,
|
||||
see {@link https://github.com/jedisct1/libhydrogen/wiki/Contexts}
|
||||
* @property {Uint8Array} input - A buffer representing the stringified JSON object used as the input to the signing operation
|
||||
* @property {Uint8Array} signature - A buffer representing the digital signature of the signed JSON object
|
||||
*/
|
||||
* @property {Uint8Array} input - A buffer representing the stringified JSON object used as the input to the signing operation
|
||||
* @property {Uint8Array} signature - A buffer representing the digital signature of the signed JSON object
|
||||
*/
|
||||
|
||||
/**
|
||||
* Digital signing of an ArrayBuffer's contents
|
||||
* @private
|
||||
* @param {ArrayBuffer} input - An ArrayBuffer to be signed
|
||||
* @param {string} context - A string used to define the context of the signing operation,
|
||||
* see {@link https://github.com/jedisct1/libhydrogen/wiki/Contexts}
|
||||
* @param {Uint8Array} privateKey - The private key to use for the digital signing operation
|
||||
* @returns {SignedJSON} A signed JSON object
|
||||
* @returns {SignedObject} An object containing the signature, the ArrayBuffer used to generate the signature, and the signing operation's context
|
||||
*/
|
||||
async function sign(input, context, privateKey) {
|
||||
// Importing libhydrogen's signing keygen and signing and verification functions
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
/**
|
||||
* @author Configured Things Ltd. [getconfigured@configuredthings.com]
|
||||
* @file Developed by {@link https://configuredthings.com Configured Things} with funding from the {@link https://www.ukri.org UKRI}
|
||||
* {@link https://www.dsbd.tech Digital Security by Design} program.
|
||||
* @author Configured Things Ltd. <getconfigured@configuredthings.com>
|
||||
* @copyright Crown Copyright 2025
|
||||
* @license Apache-2.0
|
||||
*/
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
/**
|
||||
* @author Configured Things Ltd. [getconfigured@configuredthings.com]
|
||||
* @file Developed by {@link https://configuredthings.com Configured Things} with funding from the {@link https://www.ukri.org UKRI}
|
||||
* {@link https://www.dsbd.tech Digital Security by Design} program.
|
||||
* @author Configured Things Ltd. <getconfigured@configuredthings.com>
|
||||
* @copyright Crown Copyright 2025
|
||||
* @license Apache-2.0
|
||||
*/
|
||||
|
@ -8,9 +10,9 @@ import Operation from "../Operation.mjs";
|
|||
import OperationError from "../errors/OperationError.mjs";
|
||||
|
||||
/**
|
||||
* Configured Things - Digital Security by Design - Signed JSON to Text operation
|
||||
* Signed Object to ArrayBuffer operation
|
||||
*/
|
||||
class SignedJSONToArrayBuffer extends Operation {
|
||||
class SignedObjectToArrayBuffer extends Operation {
|
||||
|
||||
/**
|
||||
* SignedJSONToArrayBuffer constructor
|
||||
|
@ -18,9 +20,9 @@ class SignedJSONToArrayBuffer extends Operation {
|
|||
constructor() {
|
||||
super();
|
||||
|
||||
this.name = "Signed JSON to ArrayBuffer";
|
||||
this.name = "Signed Object to ArrayBuffer";
|
||||
this.module = "Default";
|
||||
this.description = "Converts signed JSON to text";
|
||||
this.description = "Converts a digitally signed object created by, for example, the 'LibHydrogen Curve25519 Sign' operation to an ArrayBuffer";
|
||||
this.infoURL = ""; // Usually a Wikipedia link. Remember to remove localisation (i.e. https://wikipedia.org/etc rather than https://en.wikipedia.org/etc)
|
||||
this.inputType = "JSON";
|
||||
this.outputType = "ArrayBuffer";
|
||||
|
@ -49,4 +51,4 @@ class SignedJSONToArrayBuffer extends Operation {
|
|||
}
|
||||
}
|
||||
|
||||
export default SignedJSONToArrayBuffer;
|
||||
export default SignedObjectToArrayBuffer;
|
Loading…
Add table
Add a link
Reference in a new issue