* Browser-compatible SHA-256 hash using crypto-browserify * @param data - Data to hash * @returns Promise resolving to hex-encoded hash
(data: string)
| 33 | * @returns Promise resolving to hex-encoded hash |
| 34 | */ |
| 35 | async function sha256Hash(data: string): Promise<string> { |
| 36 | const hash = crypto.createHash('sha256'); |
| 37 | hash.update(data, 'utf8'); |
| 38 | return hash.digest('hex'); |
| 39 | } |
| 40 | |
| 41 | /** |
| 42 | * Get the hash of a docker-compose configuration |
no test coverage detected