fix: Fix the output of mask if mask is empty
This commit is contained in:
parent
274b65c6fd
commit
6a2f631e46
1 changed files with 4 additions and 0 deletions
|
|
@ -180,6 +180,10 @@ pub fn gcm_crack(args: &Value) -> Result<CrackAnswer> {
|
||||||
|
|
||||||
let forgery_auth_tag = xor_bytes(&eky0, forgery_ghash).unwrap();
|
let forgery_auth_tag = xor_bytes(&eky0, forgery_ghash).unwrap();
|
||||||
|
|
||||||
|
if eky0.is_empty() {
|
||||||
|
eky0 = vec![0; 16];
|
||||||
|
}
|
||||||
|
|
||||||
Ok(CrackAnswer {
|
Ok(CrackAnswer {
|
||||||
tag: BASE64_STANDARD.encode(forgery_auth_tag),
|
tag: BASE64_STANDARD.encode(forgery_auth_tag),
|
||||||
H: h_candidate.to_b64(),
|
H: h_candidate.to_b64(),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue