Select Git revision
aes-encrypt-table.c
Forked from
Nettle / nettle
Source project has a limited visibility.
-
Niels Möller authored
contain index values shifted by the size of a word, and with 2 added. This saves some additions in the sparc assembler code. Updates aes-encrypt-table.c and aes-decrypt-table.c. * aes-internal.h (struct aes_table): Renamed the shift_idx field to sparc_idx, as it will be tweaked to improve the sparc code. Also reduced its size to [2][4]. (IDX_FACTOR): Deleted constant. * aes-encrypt-table.c (_aes_encrypt_table): Adapted initializer of sparc_idx. * aes-decrypt-table.c (_aes_decrypt_table): Likewise. * asm.m4: Deleted AES_SIDX2, to match struct aes_table. Rev: src/nettle/aes-decrypt-table.c:1.3 Rev: src/nettle/aes-encrypt-table.c:1.3 Rev: src/nettle/aes-internal.h:1.8
Niels Möller authoredcontain index values shifted by the size of a word, and with 2 added. This saves some additions in the sparc assembler code. Updates aes-encrypt-table.c and aes-decrypt-table.c. * aes-internal.h (struct aes_table): Renamed the shift_idx field to sparc_idx, as it will be tweaked to improve the sparc code. Also reduced its size to [2][4]. (IDX_FACTOR): Deleted constant. * aes-encrypt-table.c (_aes_encrypt_table): Adapted initializer of sparc_idx. * aes-decrypt-table.c (_aes_decrypt_table): Likewise. * asm.m4: Deleted AES_SIDX2, to match struct aes_table. Rev: src/nettle/aes-decrypt-table.c:1.3 Rev: src/nettle/aes-encrypt-table.c:1.3 Rev: src/nettle/aes-internal.h:1.8
Ident.pmod 3.66 KiB
//! An implementation of the IDENT protocol, specified in RFC 931.
#pike __REAL_VERSION__
// #define IDENT_DEBUG
constant lookup_async = AsyncLookup;
//!
class AsyncLookup
{
Stdio.File con;
function(array(string), mixed ...:void) callback;
array cb_args;
string query;
string read_buf = "";
protected void do_callback(array(string) reply)
{
#ifdef IDENT_DEBUG
werror("Protocols.Ident: calling callback\n");
#endif /* IDENT_DEBUG */
mixed err;
if (callback) {
err = catch {
callback(reply, @cb_args);
};
callback = 0;
cb_args = 0;
}
if (con) {
con->close();
destruct(con);
}
query = "";
read_buf = "";
con = 0;
if (err) {
throw(err);
}
}
protected void write_cb()
{
#ifdef IDENT_DEBUG
werror("Protocols.Ident: sending query\n");
#endif /* IDENT_DEBUG */
int i = con->write(query);
if (i >= 0) {
query = query[i..];
if (sizeof(query)) {
return;
}
con->set_write_callback(0);
} else {
do_callback(({ "ERROR", "FAILED TO SEND REQUEST" }));
}
}
protected void read_cb(mixed ignored, string data)
{
#ifdef IDENT_DEBUG
werror("Protocols.Ident: reading data\n");
#endif /* IDENT_DEBUG */
read_buf += data;