File: base32_test.sh

package info (click to toggle)
google-authenticator 20191231-2
  • links: PTS
  • area: main
  • in suites: bookworm, bullseye
  • size: 364 kB
  • sloc: ansic: 3,729; makefile: 68; sh: 36; python: 10
file content (14 lines) | stat: -rwxr-xr-x 281 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/bin/bash

a=0
while [ $a -lt 150 ] ;do
	dd if=/dev/urandom bs=$RANDOM count=1 of=testfile > /dev/null 2>&1
	cat testfile | ./base32 -e | ./base32 -d > testfile.out
	if ! cmp -s testfile testfile.out ; then
		echo FAILED
		exit 1
	fi
	a=$((a + 1))
done

rm testfile testfile.out