I need to add '0' to the end of plaintext, then I can use it within cipher to deduct it equally to 64-bit, the error in below code (append)
조회 수: 1 (최근 30일)
이전 댓글 표시
plaintext = 'In literature, cryptosystems based on digital chaos were mostly designed for a broad range '
plainlen = length(plaintext);
y = mod(plainlen,8);
if y ~= 0
x = 8-y;
for j=1:x
plaintext=append(plaintext,'0'); %
end
end
답변 (1개)
Walter Roberson
2023년 8월 19일
plaintext = 'In literature, cryptosystems based on digital chaos were mostly designed for a broad range '
plainlen = length(plaintext);
y = mod(plainlen,8);
if y ~= 0
plaintext = [plaintext, repmat('0', 1, 8-y)];
end
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Encryption / Cryptography에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!