Skip to content

Commit ceb1259

Browse files
rferenszgroza
andauthored
Apply suggestions from code review
Co-authored-by: Zgroza (Luke) Klimek <zgroza@google.com>
1 parent 15e7560 commit ceb1259

2 files changed

Lines changed: 10 additions & 7 deletions

File tree

js/sign/src/signers/integrity-block-signer.ts

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,18 +27,21 @@ export class IntegrityBlockSigner {
2727
private readonly signingStrategies: Array<ISigningStrategy>;
2828

2929
/**
30-
* @internal This class is only internal, use SignedWebBundle.from* instead
31-
* First argument can be only a pure web bundle (without integrity block)
30+
* @internal This constructor is only internal, use `SignedWebBundle` for adding new
31+
* signatures instead.
32+
*
33+
* First argument can be only a pure web bundle (without integrity block).
3234
*/
3335
constructor(
3436
webBundle: Uint8Array,
3537
integrityBlock: IntegrityBlock,
3638
signingStrategies: Array<ISigningStrategy>
3739
);
3840
/**
39-
* @deprecated This class is only internal, use SignedWebBundle.from* instead
40-
* Marked as deprecated, not internal for backward compatibility
41-
* First argument can be only a pure web bundle (without integrity block)
41+
* @deprecated External access to `IntegrityBlockSigner` will be removed in
42+
* a future version, use `SignedWebBundle.from*` instead.
43+
*
44+
* First argument can be only a pure web bundle (without integrity block).
4245
*/
4346
constructor(
4447
webBundle: Uint8Array,
@@ -125,7 +128,7 @@ export class IntegrityBlockSigner {
125128
return this.integrityBlock;
126129
}
127130

128-
/** @deprecated This class is only internal, use SignedWebBundle instead*/
131+
/** @deprecated This class will become only internal in a future release, use `SignedWebBundle` instead*/
129132
readWebBundleLength(): number {
130133
// The length of the web bundle is contained in the last 8 bytes of the web
131134
// bundle, represented as BigEndian.

js/sign/src/utils/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export function isAsymmetricKeyTypeSupported(key: crypto.KeyObject): boolean {
4040
return maybeGetSignatureType(key) !== null;
4141
}
4242

43-
// 'Pure' = not signed web bundles
43+
// 'Pure' = not signed web bundles (without integrity block)
4444
export function isPureWebBundle(bundle: Uint8Array): boolean {
4545
let parsedBundle: Uint8Array[];
4646
try {

0 commit comments

Comments
 (0)