1 | import { base64Encode } from '../base64/index.js';
|
2 | import { ENCODING, ENCODING_NONE, ENCODING_VERSION } from './constants.js';
|
3 | export function jsonEncryptFormat(encoded, contentType, isEncrypted) {
|
4 | return {
|
5 | encoded: base64Encode(encoded),
|
6 | encoding: {
|
7 | content: contentType,
|
8 | type: isEncrypted
|
9 | ? ENCODING
|
10 | : ENCODING_NONE,
|
11 | version: ENCODING_VERSION
|
12 | }
|
13 | };
|
14 | }
|