-
Notifications
You must be signed in to change notification settings - Fork 4
/
integrity.sh
executable file
·34 lines (27 loc) · 1.19 KB
/
integrity.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/usr/bin/env sh
###############################################################################
# #
# Apple CloudKit TypeScript Library #
# #
# Copyright (c) TypeScriptLibs and Contributors #
# #
# Licensed under the MIT License; you may not use this file except in #
# compliance with the License. You may obtain a copy of the MIT License at #
# https://typescriptlibs.org/LICENSE.txt #
# #
###############################################################################
cd "$(dirname "$0")/";
echo "Integrity hashs for $1";
echo "\nsha256-";
cat "$1" | \
openssl dgst -sha256 -binary | \
openssl base64 -A
echo "\nsha384-";
cat "$1" | \
openssl dgst -sha384 -binary | \
openssl base64 -A
echo "\nsha512-";
cat "$1" | \
openssl dgst -sha512 -binary | \
openssl base64 -A
echo "\n";