accepts options

This commit is contained in:
Nebel 2024-09-18 14:28:56 +09:00
parent 9b64464d81
commit ddcb93da0c
Signed by: nebel
GPG key ID: 79807D08C6EF6460
2 changed files with 2 additions and 2 deletions

View file

@ -35,7 +35,7 @@ export function getPrioritizedHashAlgorithm(
}
export const IntegrityMetadataRegex =
/^(?<alg>sha256|sha384|sha512)-(?<val>(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?)(?:[?](?<opts>[\x21-\x7e]*))?$/;
/^(?<alg>sha256|sha384|sha512)-(?<val>(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?)(?:[?](?<opt>[\x21-\x7e]*))?$/;
export const SeparatorRegex = /[^\x21-\x7e]+/;

View file

@ -38,7 +38,7 @@ test("supports SHA-512", function () {
});
});
test.todo("accepts options", function () {
test("accepts options", function () {
const integrityMetadata = new IntegrityMetadata(
"sha256-MV9b23bQeMQ7isAGTkoBZGErH853yGk0W/yUx1iU7dM=?foo?bar",
);