diff options
author | Amaury Pouly <amaury.pouly@gmail.com> | 2012-11-12 18:35:00 +0100 |
---|---|---|
committer | Amaury Pouly <amaury.pouly@gmail.com> | 2012-11-13 18:25:00 +0100 |
commit | 214f226ca63c8c5d6f446d69ffe95aec91779254 (patch) | |
tree | 79331e1f87552db1733ca4eb702e355a7c12ed10 /utils/nwztools/upgtools/mg.cpp | |
parent | 02f67224f9c424bf9c3a613741adfccaf4847d12 (diff) |
upgtools: allow creation of a UPG archive + improvements
Change-Id: I9c3e2eb95f7eb6d41591b006328fd720dfcf93a5
Diffstat (limited to 'utils/nwztools/upgtools/mg.cpp')
-rw-r--r-- | utils/nwztools/upgtools/mg.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/utils/nwztools/upgtools/mg.cpp b/utils/nwztools/upgtools/mg.cpp index 8816259755..21659ff3cf 100644 --- a/utils/nwztools/upgtools/mg.cpp +++ b/utils/nwztools/upgtools/mg.cpp @@ -33,6 +33,8 @@ namespace inline int dec_des_ecb(void *in, int size, void *out, uint8_t *key) { + if(size % 8) + return 42; g_dec.SetKey(key, 8); g_dec.ProcessData((byte*)out, (byte*)in, size); return 0; @@ -40,6 +42,8 @@ namespace inline int enc_des_ecb(void *in, int size, void *out, uint8_t *key) { + if(size % 8) + return 42; g_enc.SetKey(key, 8); g_enc.ProcessData((byte*)out, (byte*)in, size); return 0; |