Newer
Older
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
/*
* @author
*
* @version
* 1.0
* @desc
*
* @remark
*
* @see
*
*/
module TestCodec_SecuredFuntions {
// LibCommon
import from LibCommon_BasicTypesAndValues all;
import from LibCommon_DataStrings all;
// LibIts
import from IEEE1609dot2BaseTypes language "ASN.1:1997" all;
import from IEEE1609dot2 language "ASN.1:1997" all;
import from EtsiTs103097Module language "ASN.1:1997" all;
// LibItsSecurity
import from LibItsSecurity_EncdecDeclarations all;
import from LibItsSecurity_TypesAndValues all;
import from LibItsSecurity_Templates all;
import from LibItsSecurity_Functions all;
import from LibItsSecurity_Pixits all;
// TestCodec
import from TestCodec_TestAndSystem all;
testcase tc_sha256_1() runs on TCType system TCType {
var octetstring v_test := '616263'O;
var octetstring v_exp_hash := 'ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad'O;
var Oct32 v_hash;
v_hash := f_hashWithSha256(v_test);
if (match(v_hash, v_exp_hash) == false) {
setverdict(fail);
} else {
setverdict(pass);
}
} // End of test tc_sha256_1
} // End of module TestCodec_SecuredFuntions