/** * @license * @preserve * * KeeeX SAS Public code * https://keeex.me * Copyright 2013-2023 KeeeX All Rights Reserved. * * These computer program listings and specifications, herein, * are and remain the property of KeeeX SAS. The intellectual * and technical concepts herein are proprietary to KeeeX SAS * and may be covered by EU and foreign patents, * patents in process, trade secrets and copyright law. * * These listings are published as a way to provide third party * with the ability to process KeeeX data. * As such, support for public inquiries is limited. * They are provided "as-is", without warrany of any kind. * * They shall not be reproduced or copied or used in whole or * in part as the basis for manufacture or sale of items unless * prior written permission is obtained from KeeeX SAS. * * For a license agreement, please contact: * * */ import * as cipher from "@keeex/crypto/cipher.js"; import * as digest from "@keeex/crypto/digest.js"; import * as cryptoKeys from "@keeex/crypto/keys.js"; import type * as types from "./types.js"; import type Marshaller from "@keeex/utils/marshalling/marshaller.js"; import type Unmarshaller from "@keeex/utils/marshalling/unmarshaller.js"; interface DefaultParams { /** Hash algorithm to hash key's address */ v1AddressHashDigest: digest.Algorithms; /** AES algorithm for V1 */ v1AesAlgorithm: cipher.Algorithms; /** AES Key length for V1 */ v1AesKeyLen: number; /** Hash to compute originalHash for integrity purpose */ v1OriginalDataDigest: digest.Algorithms; /** * Algorithm to perform a KDF on the shared secret, to derive DataKey's * encryption key */ v1SharedSecretKdfDigest: digest.Algorithms; } export declare const defaultParams: () => DefaultParams; /** Compute a proper encryption key from a shared secret */ export declare const getEncKeyFromSharedSecretV1: (sharedSecret: Uint8Array) => Promise; /** Read a single recipient header */ export declare const readRecipientHeaderV1: (unmarshaller: Unmarshaller) => types.BundleKeyDefinition; /** The payload format is the same for V1 and V2 */ export declare const readPayloadV1: (unmarshaller: Unmarshaller) => types.BundleData; /** Read a bundle V1 file (after version byte) */ export declare const loadBundleFileV1: (unmarshaller: Unmarshaller) => Promise; /** The same is used for V1 and V2 */ export declare const writeRecipientHeaderV1: (marshaller: Marshaller, header: types.BundleKeyDefinition) => void; export {};