필터 지우기
필터 지우기

how to create random number of 64 bit length like this for example'B8​FF5AF858E2​746937204F​B9C8B102D7​ECC50A60B4​BA3944AC7A​9F3C2DD4C4​EF'

조회 수: 3 (최근 30일)
how to create random number of 64 bit length like this for example'B8FF5AF858E2746937204FB9C8B102D7ECC50A60B4BA3944AC7A9F3C2DD4C4EF'

채택된 답변

Guillaume
Guillaume 2018년 11월 29일
편집: Guillaume 2018년 11월 29일
That number is not 64-bit long. It is 64 hexadecimal characters long, which would be 64*8 = 512 bits!
To create a 64-character random string:
characters = ['0':'9', 'A':'F']; %list of characters allowed in the string
randstring = characters(randi(numel(characters), 1, 64))
Note that it is not possible to store a 512-bit number in base matlab other than as a string.
  댓글 수: 1
moni sinha
moni sinha 2018년 11월 29일
how to read the first record saved in m30.txt and do hashing using sha128 anddo bitxor operation with random number hashed value)of 64 bit hexadecimal Screenshot (34).png

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Random Number Generation에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by