⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 epic-crypt-gpg-aa

📁 EPIC IRC客户端。来源于IRCII客户端但做了很多性能和功能的优化。
💻
字号:
#!/bin/bash## This script demonstrates ascii armoring.  It is rather complicated# because it uses the ascii armoring present in gpg, which wraps in# a way that is unusable for irc.  One of the things that can be# done is to join all the cyphertext lines together, and reformat# them into a valid gpg message again at the other end.## Decryption is a little tricky.  What we do is create a token ascii# armored gpg message, strip it of the message content, fill it in# with the reformatted message and pipe it back into gpg for# decryption.## Since the plaintext and cyphertext are read in non-newline binary# mode, echo -n is used.function encrypt {	( echo "$KEY" ; cat ) | gpg -ca -z 9 --batch --passphrase-fd 0 | (		while read && [ -n "$REPLY" ] ; do : ; done		while read && [ -n "$REPLY" ] ; do			[ -n "$LAST" ] && echo -n "$LAST " ;			LAST="$REPLY"		done	)}function decrypt {	read -a input	( echo x | gpg -ca --batch --passphrase-fd 0 | (		while read && [ -n "$REPLY" ] ; do echo "$REPLY" ; done		while read && [ -n "$REPLY" ] ; do LAST="$REPLY" ; done		echo		for foo in "${input[@]}" ; do echo "$foo" ; done		echo "$LAST"	) ) | ( echo "$KEY" ; cat ) | gpg -a --batch --passphrase-fd 0}proto="$1"shift 1read KEY TRASHcase "$proto" inencrypt) encrypt "$@" ;;decrypt) decrypt "$@" ;;*)	echo `basename $0` "{encrypt|decrypt} < text" 1>&2 ;;esac

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -