Next.js website for Rocky Mountain Vending company featuring: - Product catalog with Stripe integration - Service areas and parts pages - Admin dashboard with Clerk authentication - SEO optimized pages with JSON-LD structured data Co-authored-by: Cursor <cursoragent@cursor.com>
11 lines
494 B
Text
11 lines
494 B
Text
import { CLIENT_SUPPORTED_ALGORITHMS, PRIORITY_ORDER_ALGORITHMS } from "./types";
|
|
export const getChecksumAlgorithmListForResponse = (responseAlgorithms = []) => {
|
|
const validChecksumAlgorithms = [];
|
|
for (const algorithm of PRIORITY_ORDER_ALGORITHMS) {
|
|
if (!responseAlgorithms.includes(algorithm) || !CLIENT_SUPPORTED_ALGORITHMS.includes(algorithm)) {
|
|
continue;
|
|
}
|
|
validChecksumAlgorithms.push(algorithm);
|
|
}
|
|
return validChecksumAlgorithms;
|
|
};
|