function arr_encryption(msg) {
var message = msg.split(' ').join('.'),
output = '';
// add . if needed
for (k=0;k<message.length % 6;k++) {
message += '.';
}
// [Attack.at.noon] => change
for (j=0;j<6;j++) {
for (i=j;i<message.length;i+=6) {
output += message[i];
}
if (j<5)output += ' ';
}
return output;
}
105 char
m = arguments[j=0]
while(m.length %6) m += O=o=' '
for (;j<6;O += o)
for (i=j++;d=m[i];i+=6)
O += d == o ? '.' : d
return O.trim()
best answer from someone else
m = arguments[0]
i = 6
r = ''
for (; i; i && (r += ' '))
for (j = -i--; j < m.length-i; r += t > ' ' ? t : '.')
t = m[j += 6] || '.'
return r