如果 128 位长度超过 16 个字符,如何加密 AES?

问题描述

以下是 Matlab 中的代码片段,如果长度小于 16,则填充零:

function plaintext_zeros = zerofill(plaintext)

    if(length(plaintext) >= 1 && length(plaintext) < 16)
        for i = length(plaintext)+1:16
            plaintext(i) = 0;
        end
    elseif(length(plaintext) > 16)
        error('Input plaintext has to be between 1 and 16 characters.');
    elseif(isempty(plaintext))
        error('No input plaintext given');        
    end
    
    plaintext_zeros = plaintext;

end

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)