so i want to make encoding using spread spectrum with audio. i was try using this web to do it, the website try to encoding with image. the string was input must be convert to binary. but i change input string to use bytes (the result from encrypt using AES). i was using python and the result from print bi it's none, why is it none?
here's the code i tried:
password = b'\xbb\xbaS`'
def password(password):
print(password)
g = password
le=len(g)
i=0
a=list()
for i in range(le):
a.append(0) #initializing
j=0
for i in g:
a[j]=i
j+=1
print(a) #ascii values
bi= [ [ 0 for i in range(8) ] for j in range(le) ]
j=0
i=7
while(j<le):
while(i>-1):
bi[j][i]=a[j]%2
a[j]=(a[j]-bi[j][i])//2
i-=1
j+=1
i=7
print(bi)#binary
i=0
j=0
while(j<le):
while(i<8):
if bi[j][i]==0:
bi[j][i]=-1
i+=1
j+=1
i=0
i=0
j=0
print(bi)#this is where 0s are converted to -1s
and here's the terminal result:
[0]
[0, 0]
[0, 0, 0]
[0, 0, 0, 0]
[187, 186, 83, 96]
[[1, 0, 1, 1, 1, 0, 1, 1], [1, 0, 1, 1, 1, 0, 1, 0], [0, 1, 0, 1, 0, 0, 1, 1], [0, 1, 1, 0, 0, 0, 0, 0]]
[[1, -1, 1, 1, 1, -1, 1, 1], [1, -1, 1, 1, 1, -1, 1, -1], [-1, 1, -1, 1, -1, -1, 1, 1], [-1, 1, 1, -1, -1, -1, -1, -1]]
None