Type alias PolykeyWorkerManifest

PolykeyWorkerManifest: {
    checkPassword(__namedParameters, transferList?) => Promise<{
        data: boolean;
    }>;
    decrypt(data, transferList) => Promise<{
        data: ArrayBuffer;
        transferList: [ArrayBuffer];
    } | {
        data: undefined;
        transferList: [];
    }>;
    encrypt(data, transferList) => Promise<{
        data: ArrayBuffer;
        transferList: [ArrayBuffer];
    }>;
    generateCertificate(__namedParameters, transferList?) => Promise<{
        data: ArrayBuffer;
        transferList: [ArrayBuffer];
    }>;
    generateDeterministicKeyPair(__namedParameters) => Promise<{
        data: {
            privateKey: ArrayBuffer;
            publicKey: ArrayBuffer;
            secretKey: ArrayBuffer;
        };
        transferList: [ArrayBuffer, ArrayBuffer, ArrayBuffer];
    }>;
    hashPassword(__namedParameters, transferList?) => Promise<{
        data: [ArrayBuffer, ArrayBuffer];
        transferList: [ArrayBuffer, ArrayBuffer];
    }>;
    sleep(__namedParameters) => Promise<{
        data: undefined;
    }>;
}

Type declaration

  • checkPassword:function
    • Parameters

      • __namedParameters: {
            hash: ArrayBuffer;
            memLimit?: PasswordMemLimit;
            opsLimit?: PasswordOpsLimit;
            password: string;
            salt: ArrayBuffer;
        }
      • Optional transferList: ArrayBuffer[]

      Returns Promise<{
          data: boolean;
      }>

  • decrypt:function
    • Parameters

      • data: {
            cipherText: ArrayBuffer;
            key: ArrayBuffer;
        }
        • cipherText: ArrayBuffer
        • key: ArrayBuffer
      • transferList: ArrayBuffer[]

      Returns Promise<{
          data: ArrayBuffer;
          transferList: [ArrayBuffer];
      } | {
          data: undefined;
          transferList: [];
      }>

  • encrypt:function
    • Parameters

      • data: {
            key: ArrayBuffer;
            plainText: ArrayBuffer;
        }
        • key: ArrayBuffer
        • plainText: ArrayBuffer
      • transferList: ArrayBuffer[]

      Returns Promise<{
          data: ArrayBuffer;
          transferList: [ArrayBuffer];
      }>

  • generateCertificate:function
    • Parameters

      • __namedParameters: {
            certId: ArrayBuffer;
            duration: number;
            issuerAttrsExtra?: {
                [key: string]: string[];
            }[];
            issuerPrivateKey: ArrayBuffer;
            now?: Date;
            subjectAttrsExtra?: {
                [key: string]: string[];
            }[];
            subjectKeyPair: {
                privateKey: ArrayBuffer;
                publicKey: ArrayBuffer;
            };
        }
        • certId: ArrayBuffer
        • duration: number
        • Optional issuerAttrsExtra?: {
              [key: string]: string[];
          }[]
        • issuerPrivateKey: ArrayBuffer
        • Optional now?: Date
        • Optional subjectAttrsExtra?: {
              [key: string]: string[];
          }[]
        • subjectKeyPair: {
              privateKey: ArrayBuffer;
              publicKey: ArrayBuffer;
          }
          • privateKey: ArrayBuffer
          • publicKey: ArrayBuffer
      • Optional transferList: ArrayBuffer[]

      Returns Promise<{
          data: ArrayBuffer;
          transferList: [ArrayBuffer];
      }>

  • generateDeterministicKeyPair:function
    • Parameters

      Returns Promise<{
          data: {
              privateKey: ArrayBuffer;
              publicKey: ArrayBuffer;
              secretKey: ArrayBuffer;
          };
          transferList: [ArrayBuffer, ArrayBuffer, ArrayBuffer];
      }>

  • hashPassword:function
    • Parameters

      Returns Promise<{
          data: [ArrayBuffer, ArrayBuffer];
          transferList: [ArrayBuffer, ArrayBuffer];
      }>

  • sleep:function
    • Parameters

      • __namedParameters: {
            delay: number;
        }
        • delay: number

      Returns Promise<{
          data: undefined;
      }>

Generated using TypeDoc