diff options
author | Alex Gaynor <alex.gaynor@gmail.com> | 2013-10-05 20:37:26 -0700 |
---|---|---|
committer | Alex Gaynor <alex.gaynor@gmail.com> | 2013-10-05 20:37:26 -0700 |
commit | b643b806145be95023e82c75a5bcd4ecadaa3da2 (patch) | |
tree | ff0c7432cc36e52da49dd0f52de596286487ec7b | |
parent | a148c31c9caa1ce37ae66a4ff2267436dc2fc311 (diff) | |
parent | 92830105db0d416402852851c25979a7c34bd8c4 (diff) | |
download | cryptography-b643b806145be95023e82c75a5bcd4ecadaa3da2.tar.gz cryptography-b643b806145be95023e82c75a5bcd4ecadaa3da2.tar.bz2 cryptography-b643b806145be95023e82c75a5bcd4ecadaa3da2.zip |
Merge pull request #92 from reaperhulk/rand-bindings
rand bindings for openssl (refs #77)
-rw-r--r-- | cryptography/bindings/openssl/api.py | 1 | ||||
-rw-r--r-- | cryptography/bindings/openssl/rand.py | 37 |
2 files changed, 38 insertions, 0 deletions
diff --git a/cryptography/bindings/openssl/api.py b/cryptography/bindings/openssl/api.py index 0da1af61..12927782 100644 --- a/cryptography/bindings/openssl/api.py +++ b/cryptography/bindings/openssl/api.py @@ -30,6 +30,7 @@ class API(object): "dh", "dsa", "evp", + "rand", "rsa", "opensslv", ] diff --git a/cryptography/bindings/openssl/rand.py b/cryptography/bindings/openssl/rand.py new file mode 100644 index 00000000..e4f6be23 --- /dev/null +++ b/cryptography/bindings/openssl/rand.py @@ -0,0 +1,37 @@ +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +# implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +INCLUDES = """ +#include <openssl/rand.h> +""" + +TYPES = """ +""" + +FUNCTIONS = """ +void RAND_seed(const void *, int); +void RAND_add(const void *, int, double); +int RAND_status(); +int RAND_egd(const char *); +int RAND_egd_bytes(const char *, int); +int RAND_query_egd_bytes(const char *, unsigned char *, int); +const char *RAND_file_name(char *, size_t); +int RAND_load_file(const char *, long); +int RAND_write_file(const char *); +void RAND_cleanup(); +int RAND_bytes(unsigned char *, int); +int RAND_pseudo_bytes(unsigned char *, int); +""" + +MACROS = """ +""" |