File tree Expand file tree Collapse file tree 1 file changed +2
-0
lines changed Expand file tree Collapse file tree 1 file changed +2
-0
lines changed Original file line number Diff line number Diff line change @@ -176,6 +176,7 @@ defmodule Scenic.Cache.Hash do
176
176
If the verification passes, returns `{:ok, hash}`
177
177
If it fails, returns `{:error, :hash_failure}`
178
178
"""
179
+ @ spec verify_file ( path :: bitstring , hash :: bitstring , type :: hash_type ) :: binary | hash_error
179
180
def verify_file ( path , hash , hash_type ) do
180
181
case file ( path , hash_type ) do
181
182
{ :ok , computed_hash } ->
@@ -196,6 +197,7 @@ defmodule Scenic.Cache.Hash do
196
197
If the verification passes, returns the hash unchanged.
197
198
If it fails, raises an error
198
199
"""
200
+ @ spec verify_file! ( path :: bitstring , hash :: bitstring , type :: hash_type ) :: binary | no_return
199
201
def verify_file! ( path , hash , hash_type ) do
200
202
case file! ( path , hash_type ) == hash do
201
203
true -> hash
You can’t perform that action at this time.
0 commit comments