+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include "ice.h"
+
+unsigned char keymat[] = { 0x5C, 0x09, 0xD8, 0x3A, 0x2A, 0x3A, 0x47, 0x8A };
+
+int main(int argc, char **argv)
+{
+ unsigned char in[8], out[8];
+ ICE_KEY *key = ice_key_create(1);
+ ice_key_set(key, keymat);
+
+ for ( ;; ) {
+ int ret = fread(in, 1, 8, stdin);
+ if (ret == 0) {
+ exit(0);
+ }
+ if (ret < 8) {
+ memset(in + ret, 0, (8 - ret));
+ }
+ ice_key_encrypt(key, in, out);
+ fwrite(out, 8, 1, stdout);
+ }
+}