2 * This file and its contents are supplied under the terms of the
3 * Common Development and Distribution License ("CDDL"), version 1.0.
4 * You may only use this file in accordance with the terms of version
7 * A full copy of the text of the CDDL should have accompanied this
8 * source. A copy of the CDDL is also available via the Internet at
9 * http://www.illumos.org/license/CDDL.
13 * Copyright 2016 Nexenta Systems, Inc. All rights reserved.
17 #include "cryptotest.h"
32 args
.inlen
= sizeof (ECB_DATA
);
33 args
.outlen
= sizeof (N
);
36 args
.mechname
= SUN_CKM_AES_ECB
;
39 for (i
= 0; i
< sizeof (RES
) / sizeof (RES
[0]); i
++) {
41 args
.keylen
= KEYLEN
[i
];
42 errs
+= run_test(&args
, RES
[i
], RESLEN
[i
], ENCR_FG
);
43 (void) fprintf(stderr
, "----------\n");
46 (void) fprintf(stderr
, "\t\t\t=== decrypt ===\n----------\n\n");
48 for (i
= 0; i
< sizeof (RES
) / sizeof (RES
[0]); i
++) {
51 args
.keylen
= KEYLEN
[i
];
52 args
.inlen
= RESLEN
[i
];
53 errs
+= run_test(&args
, ECB_DATA
, sizeof (ECB_DATA
), DECR_FG
);
54 (void) fprintf(stderr
, "----------\n");
57 (void) fprintf(stderr
, "%d tests failed\n", errs
);