Comparison

spec/util_crypto_spec.lua @ 12700:899c057781cd

spec: Move test crypto keys to a shared file for clarity and easy maintenance
author Matthew Wild <mwild1@gmail.com>
date Sat, 02 Jul 2022 12:36:52 +0100
parent 12693:7c5afbdcbc77
child 12703:5bda8598a2af
comparison
equal deleted inserted replaced
12699:b3d0c1457584 12700:899c057781cd
1 local test_keys = { 1 local test_keys = require "spec.inputs.test_keys";
2 ecdsa_private_pem = [[
3 -----BEGIN PRIVATE KEY-----
4 MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQg7taVK6bPtPz4ah32
5 aD9CfvOah5omBxRVtzypwQXvZeahRANCAAQpKFeNIy27+lVo6bJslO6r2ty5rlb5
6 xEiCx8GrrbJ8S7b5IPZCS7OrBaO2iqgOf7NMsgO12eLCfMZRnA+gCC34
7 -----END PRIVATE KEY-----
8 ]];
9
10 ecdsa_public_pem = [[
11 -----BEGIN PUBLIC KEY-----
12 MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEKShXjSMtu/pVaOmybJTuq9rcua5W
13 +cRIgsfBq62yfEu2+SD2QkuzqwWjtoqoDn+zTLIDtdniwnzGUZwPoAgt+A==
14 -----END PUBLIC KEY-----
15 ]];
16
17 eddsa_private_pem = [[
18 -----BEGIN PRIVATE KEY-----
19 MC4CAQAwBQYDK2VwBCIEIOmrajEfnqdzdJzkJ4irQMCGbYRqrl0RlwPHIw+a5b7M
20 -----END PRIVATE KEY-----
21 ]];
22
23 eddsa_public_pem = [[
24 -----BEGIN PUBLIC KEY-----
25 MCowBQYDK2VwAyEAFipbSXeGvPVK7eA4+hIOdutZTUUyXswVSbMGi0j1QKE=
26 -----END PUBLIC KEY-----
27 ]];
28
29 };
30 2
31 describe("util.crypto", function () 3 describe("util.crypto", function ()
32 local crypto = require "util.crypto"; 4 local crypto = require "util.crypto";
33 local random = require "util.random"; 5 local random = require "util.random";
34 6