| ... | ... | @@ -1243,6 +1243,11 @@ pub const rsa = struct { |
| 1243 | 1243 | // DigestInfo value (see the notes below) and let tLen be the length |
| 1244 | 1244 | // in octets of T. |
| 1245 | 1245 | const hash_der: []const u8 = &switch (Hash) { |
| 1246 | crypto.hash.Md5 => .{ |
| 1247 | 0x30, 0x20, 0x30, 0x0C, 0x06, 0x08, 0x2A, 0x86, |
| 1248 | 0x48, 0x86, 0xF7, 0x0D, 0x02, 0x05, 0x05, 0x00, |
| 1249 | 0x04, 0x10, |
| 1250 | }, |
| 1246 | 1251 | crypto.hash.Sha1 => .{ |
| 1247 | 1252 | 0x30, 0x21, 0x30, 0x09, 0x06, 0x05, 0x2b, 0x0e, |
| 1248 | 1253 | 0x03, 0x02, 0x1a, 0x05, 0x00, 0x04, 0x14, |
| ... | ... | @@ -1267,6 +1272,16 @@ pub const rsa = struct { |
| 1267 | 1272 | 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x03, 0x05, |
| 1268 | 1273 | 0x00, 0x04, 0x40, |
| 1269 | 1274 | }, |
| 1275 | crypto.hash.sha3.Sha3_256 => .{ |
| 1276 | 0x30, 0x31, 0x30, 0x0D, 0x06, 0x09, 0x60, 0x86, |
| 1277 | 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x08, 0x05, |
| 1278 | 0x00, 0x04, 0x20, |
| 1279 | }, |
| 1280 | crypto.hash.sha3.Sha3_512 => .{ |
| 1281 | 0x30, 0x51, 0x30, 0x0D, 0x06, 0x09, 0x60, 0x86, |
| 1282 | 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x0a, 0x05, |
| 1283 | 0x00, 0x04, 0x40, |
| 1284 | }, |
| 1270 | 1285 | else => comptime unreachable, |
| 1271 | 1286 | }; |
| 1272 | 1287 | em_index -= hash_der.len; |