aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichal Rokos <m.rokos@sh.cvut.cz>2002-01-10 17:33:01 +0000
committerMichal Rokos <m.rokos@sh.cvut.cz>2002-01-10 17:33:01 +0000
commit6dfe210e0c550953aff89b3fe7f05f35fdda8263 (patch)
treedcc0597d07da0254d6c8353a39f586a782225dff
parentdc8f3147493a2ba249fea7557b1e0a371d7e2b0f (diff)
downloadruby-openssl-history-6dfe210e0c550953aff89b3fe7f05f35fdda8263.tar.gz
* OpenSSL::Cipher::BITx constant == x (so BIT40 = 40,...)
-rw-r--r--ChangeLog3
-rw-r--r--ossl_cipher.c26
2 files changed, 16 insertions, 13 deletions
diff --git a/ChangeLog b/ChangeLog
index 114fe2f..1c5ef90 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,6 +4,9 @@ Copyright (C) 2001 Michal Rokos <m.rokos@sh.cvut.cz>
All rights reserved.
$Log$
+Revision 1.22 2002/01/10 17:33:16 majkl
+ * OpenSSL::Cipher::BITx constant == x (so BIT40 = 40,...)
+
Revision 1.21 2002/01/10 13:46:09 majkl
* added OpenSSL-SNAPSHOT style NO_* (OPENSSL_NO_*)
* added AES cipher when compiled under OpenSSL-SNAPSHOT
diff --git a/ossl_cipher.c b/ossl_cipher.c
index c8dcbfb..e02e644 100644
--- a/ossl_cipher.c
+++ b/ossl_cipher.c
@@ -20,17 +20,17 @@
*/
/* BASIC TYPES */
#define UNSPEC 0x0000
-#define ECB 0x0001
-#define CFB 0x0002
-#define OFB 0x0004
-#define CBC 0x0008
-#define EDE 0x0010
-#define EDE3 0x0020
-#define BIT40 0x0100
-#define BIT64 0x0200
-#define BIT128 0x0400
-#define BIT192 0x0800
-#define BIT256 0x0F00
+#define ECB 0x1000
+#define CFB 0x2000
+#define OFB 0x4000
+#define CBC 0x8000
+#define EDE 0x0001
+#define EDE3 0x0002
+#define BIT40 0x0028 /*40*/
+#define BIT64 0x0040 /*64*/
+#define BIT128 0x0080 /*128*/
+#define BIT192 0x00C0 /*192*/
+#define BIT256 0x0100 /*256*/
/*
* Classes
@@ -620,8 +620,8 @@ Init_ossl_cipher(VALUE module)
/*
* automation for classes creation and initialize method binding
*/
-#define DefCipher(name, func) \
- c##name = rb_define_class_under(module, #name, cCipher); \
+#define DefCipher(name, func) \
+ c##name = rb_define_class_under(module, #name, cCipher); \
rb_define_method(c##name, "initialize", ossl_##func##_initialize, -1)
/*